Scripting / Automating Events using Arrays .CAPX

Get help using Construct 2

Post » Fri Sep 20, 2013 10:36 am

For my game i want to script events to move characters autonomously, change animations etc...

I've setup an array into which i push the events that should happen and then setup some events that execute them.

Here is my test .CAPX: CLICK ME

The events start after a few seconds...

In the debugger you can see how it works through the ActionQue (my array) step by step. :)

This works fine, however it's kinda tedious to setup and i was wondering if someone knows a better way to do this.
B
33
S
6
G
7
Posts: 339
Reputation: 7,426

Post » Fri Sep 20, 2013 11:04 am

This would be perfect for an Plugin, do you know a bit about Javascript ?
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Fri Sep 20, 2013 11:26 am

You can download your array as JSON to get the format.
Then load it at the start instead of all those push events.
B
7
S
1
Posts: 74
Reputation: 1,232

Post » Fri Sep 20, 2013 5:40 pm

Another way is to put your instructions in a text file and use tokenAt() to parse it, like this: scripting1.capx
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 33 guests