How to control set position animation

Get help using Construct 2

Post » Thu Nov 29, 2012 3:38 pm

I still try to understand and adapt the catmull rom script wrote by R0J0hound and I need some explanations about it. In this script was used a set position animation and I need control the time that animation start. Script is follow:



For example: If I use a loop to create Sprite objects by the system and use the button to start it e press it after 10 seconds after the animation preview, the Sprite will appears in the center of the stage and not in the home position. I want the animation to start after pressing the button, and not before.

Please, I really need to uderstand the procedures about how to control this animation

ThanksRenatoB2012-11-29 19:39:03
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Post » Thu Nov 29, 2012 4:16 pm

Looks like you can modify the first value "time" and see if that changes the animation speed. Ive not seen this before though, so can you describe or show what it does when running?
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Thu Nov 29, 2012 5:10 pm

I didnt find a "time" variable.

Please, look directly in the capx that R0J0hound relesead:

http://dl.dropbox.com/u/5426011/examples%208/catmullrom.capx RenatoB2012-11-29 17:11:15
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Post » Fri Nov 30, 2012 6:43 pm

Bump
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Post » Sun Dec 02, 2012 2:37 pm

Plz, I need only some explanations: If "time" is not a variable whats and how to control?
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Post » Sun Dec 02, 2012 9:34 pm

The Variable 't' stands for time.

You can use an additional boolean condition ('idle') with the for each loop. (if Sprite.Idle is false) That way the sprites starts if you switch the boolean condition.

I think you should use a different approach: The script can only work out one path, any object must be on the path. You could use pathfinding for your sprite to approach your path and then 'switch' to path follow mode. I don't really understand what you want to do though
B
4
S
1
G
1
Posts: 49
Reputation: 997

Post » Mon Dec 03, 2012 9:58 am

Hi @ GameForger

Thank you very much for the instructions. I'll try to implement them.

I try to develope a game that has ghosts as enemies. This rotation system with constant speed generates a very interesting movement for this type of character, better than if I had used waypoint. Will be able to get the same result with pathfind?
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Post » Mon Dec 03, 2012 1:52 pm

I created a boolean variable in the sprite and set it to false, added a new conditional above the "System" event with loop, to check if the variable is true and use a button to change the variable to true. The result is the same: depending on how long I wait to click the button, the sprite appears already in the middle of the screen because the animation keeps happening before I hit the button.
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Post » Tue Dec 04, 2012 9:12 am

UP
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Post » Wed Dec 05, 2012 11:40 am

Sorry for insisting so much, but I'm really interested in understanding this script and adapting for my needs after.
B
65
S
13
G
2
Posts: 969
Reputation: 6,732

Next

Return to How do I....?

Who is online

Users browsing this forum: Matthew de, Yahoo [Bot] and 28 guests