Global Veriable

Get help using Construct 2

Post » Sun Oct 28, 2012 3:39 pm

I was wondering if i could have some help with importing global variables to set speed and attributes of behaviors

I have a global variable in my event sheets that i want to be sent to the "speed" in my 8 Direction behavior

I know my capx file is a little screwy right now, but any pointers would help thank-you in advance

http://dl.dropbox.com/u/30354264/Test.capx

Objective: To pass variables to behaviorsYudraciell2012-10-29 00:30:27
B
10
S
1
G
1
Posts: 18
Reputation: 1,067

Post » Sun Oct 28, 2012 5:30 pm

Add an action/Character_Spawn

And In the first section of the events , you'll see all the actions related to 8direction behavior !
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Sun Oct 28, 2012 7:58 pm

[QUOTE=Whiteclaws] Add an action/Character_Spawn

And In the first section of the events , you'll see all the actions related to 8direction behavior ![/QUOTE]

I know that, but i cant put in &Speed to insert the speed from the global variable

I am trying to set the gobal variables to make them the character stats from the selection that they choose, then push them through into the 8 direction stat. I dont want to put in any numbers, just the value to automatically change when the global variable changes
B
10
S
1
G
1
Posts: 18
Reputation: 1,067

Post » Mon Oct 29, 2012 11:11 am

Oh , For that ! There is special expressions
Check out the manual entry !

https://www.scirra.com/manual/78/expressions

Cheers !
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Tue Oct 30, 2012 2:53 pm

thanks, I tried it, I added Character_Sprite.8direction.maxspeed &Speed

Speed is the global variable, but it doesn't plug it in, and i tried doing (Speed) at the end of it, and it says max speed doesn't accept it :(
B
10
S
1
G
1
Posts: 18
Reputation: 1,067

Post » Tue Oct 30, 2012 3:46 pm

B
54
S
28
G
18
Posts: 1,520
Reputation: 24,990

Post » Wed Oct 31, 2012 2:04 am

Wow, Im amazed...that was too easy i thought a little bit of code was involved thankyouYudraciell2012-10-31 02:18:07
B
10
S
1
G
1
Posts: 18
Reputation: 1,067


Return to How do I....?

Who is online

Users browsing this forum: Colorfish and 4 guests