change weapon

For questions about using Classic.

Post » Wed Dec 21, 2011 3:13 am

I have 3 weapons and need an example for when
press the space key to change weapon next
B
5
G
1
Posts: 10
Reputation: 895

Post » Thu Dec 22, 2011 8:23 pm

Do You have any Cap file that I can work of from?
B
7
S
2
G
1
Posts: 193
Reputation: 1,745

Post » Thu Dec 22, 2011 9:16 pm

Here is one way to do it using a single sprite object and a global variable: http://www.mediafire.com/?gq2slzbtotlnrlz

If you need to have 3 separate sprites (1 for each weapon), you'd use the same process, except this time the action for each event would be the sprite name you want the event to correspond with, and then you'd set it to have an action to set the frame of that sprite, like so:

Is global variable weapon change equal 0 ====> Sprite 3: Set animation frame to 1MrMiller2011-12-22 21:17:43
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Fri Dec 23, 2011 12:12 am

OK TANKS
B
5
G
1
Posts: 10
Reputation: 895

Post » Fri Dec 23, 2011 3:01 pm

@MrMiller :
That's not a bad solution but why waste 5 events when you can do the same in 1 event, and without any variables.

http://dl.dropbox.com/u/52670878/ChangeWeapons%201event.capshadowlord2011-12-23 15:02:18
B
6
S
1
G
1
Posts: 69
Reputation: 1,019

Post » Fri Dec 23, 2011 3:37 pm

I can't argue with using less events, but since he's a new user I doubt he--like any new user--would understand that expression or know what it means very easily or how and when to apply it, which would just lead to more questions. At the new user stage it can be confusing/overwhelming to be looking at an expression with math attached to it. At least with the style originally presented the application and intent is more immediately obvious.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests