construct caps 0.1

Post your own tutorials, guides and demos.

Post » Mon Dec 01, 2008 4:52 pm

guide was lost forever.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Mon Dec 01, 2008 7:01 pm

Looks like it'll be a good article! Going to put it on the wiki?

[quote="manontherun":3bhibm41]+ On "Punch" control down
->Trigger Once[/quote:3bhibm41]
This event looks confusing, you probably don't want to use it as an example. 'On punch down' looks like a trigger (ie. on key pressed) and therefore adding Trigger Once has no effect. You could have 'Is key down' and 'Trigger once', but why would you do that instead of 'On key pressed'?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554

Post » Mon Dec 01, 2008 11:22 pm

[quote="Ashley":34ooq0y5] You could have 'Is key down' and 'Trigger once', but why would you do that instead of 'On key pressed'?[/quote:34ooq0y5]I meant "Punch is down", I'll edit it next time. The reason I use key down and not pressed is because I had problems with it, just using the key down with custom press always seems to fix it though. I like it better anyway because it's more consistent when you are using it for all three states; press, down, and released. And I don't know I've never posted on a wiki before.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Wed Dec 03, 2008 1:24 pm

I use 'key is down' and 'trigger once' together because of the triggered events not running in the normal order of the event sheet.

Why is that, btw? What's the point of having triggered events not run in the normal order of the event sheet? All it seems to do is screw up the order, which messes up the code sometimes, since the order the events are checked/run is important - why reorder them?

For that matter, why are some conditions 'triggered' and some not? What's really the difference between 'on click' and 'key is pressed'? What makes an event a 'triggered' one instead of a regular one?
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,422

Post » Wed Dec 03, 2008 1:53 pm

If triggered events just ran normally with evaluated conditions it'd be pretty silly: the point of a triggered condition is that it runs when the event happens, not after or in another order.

For example, hitting a key would call all triggered events which ran when that key was hit. Key is down would run in the normal order if the key happened to be down.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests