Gives for creating Set Value random variable?

Discussion and feedback on Construct 2

Post » Mon Mar 17, 2014 5:06 am

I got a Global Attack Number = 0

Except that when I tap the "A button", I apply a "Set Value" in varible attack for it to be random from 0 to 4.

Image


The number to leave the set value random, do a different attack when he collision with the target object.

Is to make it so? Or have another way to do this using variable?
The developer of Dunar: Dimension Two



2017-Thistom Studios Software
B
20
S
4
G
4
Posts: 29
Reputation: 4,091

Post » Mon Mar 17, 2014 12:02 pm

It's hard to understand what you mean, but here's some tips.

You can use the expression 'Choose(0,1,2,3,4)' for picking a value randomly.
Set position will make your object 'blink' to the position, so there'll be no moving effect.
If you want it, you can use bullet behavior, or custom plugin like "Move to".
B
23
S
8
G
1
Posts: 172
Reputation: 2,780

Post » Mon Mar 17, 2014 1:57 pm

@ sharecast

I did the test here and it worked.

'Choose (0,1,2,3,4)' Just needed to know to do that.

Now I can create AI of enemie for balhata shift system.

Thank you!
The developer of Dunar: Dimension Two



2017-Thistom Studios Software
B
20
S
4
G
4
Posts: 29
Reputation: 4,091


Return to Construct 2 General

Who is online

Users browsing this forum: Euduardo, Lancifer and 12 guests