Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - drkucho

Pages: 1 [2]
16
Support / Sprite Scale Z
« on: September 06, 2014, 05:16:35 pm »
hello !

is tk2dsprite scale.z used for anything? i thought it could be there just for compatibility with unity vector3 scale but not really being used for anything, if this is true i plan to use this value for my own purposes.

please let me know.

17
Support / Camera Overrides, broken link
« on: June 04, 2014, 11:45:38 pm »
hello, im trying to understand more about camera overrides but this link is wrong

http://www.unikronsoftware.com/reference/tk2dCamera

18
Support / Script Execution order and Animation Triggers
« on: May 07, 2014, 10:50:22 pm »
Hello !

i have set my game like this:

one script called CC ( character controller) that controls each sprite, thinking what to do on collisions , update x,y position , etc , this script also set the next script AT as delegate for tk2d Animation Triggers
then the second script called AT (Animation Triggers) that handles all tk2d animation triggers, i have set a text command system, so the frameInfo is the command, and then frameInt and frameFloat are values for this commands

there is one command , the "X" command, which means "move the sprite on the X coordinate" using frameInt value
i do this kind of movement for special cases, as there are some animations that go better if they move one or two pixels only on certain frames

so AT script its calle with the tk2d anim frame triggers, it identifies the command X , and it does not change X position directly but sets a variable of CC script called CC.frameIncX with the frameInt value
then CC script at the end of Update() , among other things, changes the sprite/gameObject transform.position by summing frameIncX (that has been set by AT)

the modification of transform.position needs to be done at the end of CC because there a some more complex stuff going on on this script, including more ways to move the sprite that are all combined to work together,  so it is better to modify the transform.position only once here, by summing all the other movements in just one increment variable and then change transform.position at once.

it works, but there is a problem, the sprite frame gets displayed on screen but the frameIncX value is not summed on this unity "screen frame", the x position is updated on the next frame, so you see the sprite glitching its position ,if the increment is just one pixel you don't appreciate it , but i have a situation i need to jump 4 pixels so that frame of the sprite gets displayed 4 pixels shifted for one unity frame time, and then goes back to its good position on the next one

i have tried to change the script execution order by moving CC and AT right after tk2dSpriteAnimator, tk2dSprite scripts,  and also before them, but no luck , no matter what i do it doesnt change anything apparently

basically i need all tk2d sprite animation scripts + my CC and AT scripts to be executed all before unity updates the screen

hope i was clear enough and you have solution

19
Showcase / Ghosts'n DJ's
« on: April 10, 2014, 10:37:10 pm »
this game is two things

1.- a tribute to the best side scroller ever
2.- a lampoon to the nowadays stupid DJ scene

http://youtu.be/ph4zqlBFJQc

would be great to hear some feedback

20
Support / frame custom box colliders bug?
« on: March 02, 2014, 12:06:35 am »
i think i found a bug:

i had my sprite collection with custom box colliders , different size for each frame/sprite etc … it was working good, but i did a lot of changes on my collection , added new sprites, multiple new sprite sheets …

then i found that my game was not changing the shape of the box colliders, well it was , but only on specific frames, weird, i went to the collection messed here and there activate and deactivate them … nothing good happened, in fact then it was not changing any shapes during the game execution , just sticking to the first collider of the first frame (idle position)

after messing a while , i found that , if i change the custom box collider with a polygon collider it works, update shapes on all frames with different polygon colliders etc, i don't even need to click run to see if its gonna work cause i see in the inspector of my sprite that the polygon collider is created or removed when i click commit after adding it or removing it , but …! when it comes to box colliders, this creating/removing thing only happens with i change the sprite ID 16 (the idle position), it does not matter if the rest of sprites have box colliders , or not , if i delete the box collider of spriteID 16 and click commit , the 2DBoxCollider is removed on inspector, if i add it , it is added on inspector, its like the other sprites won't exist …

…I'm going nuts…

on a side: i also want to check the 2dtk version i have and i don't know where to check it

21
Hello

i have my player sprite collection in which i have defined custom box colliders (2D) for each frame

then i have my enemies with a circle collider called Vision to spot the player, this vision collider is monitored by a simple script with a OnTriggerEnter() and OnTriggerExit() functions

what happens is , instead of getting a single ENTER/EXIT event when the player enters/exit the Vision collider , i get a ENTER event every time the sprite frame of its animation is updated, and the worse is many EXIT events are lost, not happening, its about 50% of chance to loose them

this was not happening before when my player had a simple box collider2D component and all colliders of the sprite frames were set to "user defined"

am i doing something wrong? is this normal ? if so … any work around?

22
Support / Changing Sprite Collection at Runtime
« on: January 09, 2014, 04:14:46 pm »
I'm trying to do this, as per the script documentation.

tk2dBaseSprite.SetSprite   (tk2dSpriteCollectionData    newCollection, int    newSpriteId  )      

but i get Assets/Scripts/Player.js(384,56): BCE0005: Unknown identifier: 'KuchoShirtCollection'.

KuchoShirtCollection is the name of my sprite collection just like i have it on the project folder , yes i name my sprite collections ending on "collection" to avoid confusions

the question is how to get the tk2dSpriteCollectionData from code? javascript if possible, thanks

Pages: 1 [2]