Another thing that would be useful..

New releases and general discussions.

Post » Wed Apr 23, 2008 8:54 pm

One of the most irritating things when you create a game is when you've created a whole bunch of events, and suddenly realize that you have to add, or change something in all the events. So what about the possibility to select any number of events, and then the functions like replace condition, insert new condition etc. would affect them all!
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Wed Apr 23, 2008 10:12 pm

I'm not Ashley, but I couldn't imagine this happening without a large rewrite of how eventing works. Because the structure across events differs so vastly, Construct would have to be able to discern when and where this is appropriate in each event, if at all.

If you're having to write a whole many scenarios with like conditions, perhaps a more creative use of events is needed. Use loops, AND/OR, groups and sub events to optimize your code, loading as many actions to the same condition as possible. It takes a little practice and planning, but it's worth it in the end.

Otherwise, I feel you. I would like a feature such as this myself. In the cases where's I've had to use brute-force methods (such as within this young animation system) there have been times I'll have to take time to correct one mistake across perhaps 10 or more events.
B
3
S
2
G
4
Posts: 310
Reputation: 2,120

Post » Fri Apr 25, 2008 7:52 pm

but isn't it possible to insert a new condition in all types of events? I don't really understand what you mean..
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Fri Apr 25, 2008 8:02 pm

Can you give an example of when this would be useful? I mean, couldn't you just add a new event with the extra condition in it, and make all the other events a subevent to it?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Fri Apr 25, 2008 8:13 pm

to answer that question i need to know how sub-events works. An example would be, you've created a plattform engine, to your little game, and you've made a bunch of weapons, and have a list of events like
[color=#0000FF:3lxxcz01]Dude.value('weapon')=Shotgun
-Create a lot of bullets.[/color:3lxxcz01]

after a while you realize that you don't want to be able to shoot when you're in the air. Now, instead of going through every weapon's shoot action and add [color=#0000FF:3lxxcz01]DetectorDown is overlapping ground NOT![/color:3lxxcz01] You can just select all the event, and add that part to all events at the same time.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Sat Apr 26, 2008 12:00 am

Sounds like a pretty good idea to me... basically CTRL+Click each event sheet you want to add the new event to, and then add your event which will cascade to all selected sections. This would certainly save a lot of time in instances where repetative event situations occur.
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966

Post » Sat Apr 26, 2008 9:22 pm

Subevents are really simple, they just run if the event above them was true. Nothing special or complicated about it really. Part of their usefulness is in eliminating repeated conditions. I mean, in your case, you'd just add a DetectorDown not overlapping ground event, and make all the other events a subevent to that. That's logically the same as adding the condition to each and every event, but saving you copying and pasting the condition loads of times...
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests