ENEMY MOVEMENT AND COOLDOWN

Get help using Construct 2

Post » Mon May 06, 2013 4:40 pm

So, my friends, here I am again begging your experienced lessons. My problem today is one of AI.

My Offensive Unit gonna answer some basic commands like Stop, Follow, Patrol, Explore, Attack.

I have it all programmed in the base of variables:
Global ones *dt every tick for the timers and ORDER 1,2,3,4,5 for the specific commands.

The problem is wherever I want to right: For "COOLDOWN"=10| Do this, I have to code COOLDOWN=<11 and COOLDOWN=>9, or it simple will not work.
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Post » Mon May 06, 2013 7:13 pm

I guessing this is due to one of your values being a float and not an integer...

you need to use " int(your number) " to ensure you get a whole number...

You would be better off looking them up in the manual...

Pixel perfick2013-05-06 19:15:08
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260

Post » Tue May 07, 2013 1:47 am

Pixel, my problem is this. Lets say i have the timer writing on a text 0.001... 0.002... and I want my condition to be "2.000" so it gonna run only on that tick... but it is not working.

please, gimme more help.

I've downloaded examples and everything, but they doesn't have some like:

On CD=2 change angle
On CD=3 change speed
On CD>10 Reset CD.breackzin2013-05-07 02:23:13
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Post » Tue May 07, 2013 5:27 pm

Please, anyone? I am really on it.
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Post » Wed May 08, 2013 10:50 pm

How to do this?

On CD=2 change angle
On CD=3 change speed
On CD>10 Reset CD.

Plz anyone!
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Post » Thu May 09, 2013 5:11 pm

My future multiplayer space game. You can observe the harvesting going mad because of the unsolved question made here.

http://www.youtube.com/watch?v=PkKNakWSgpo
B
7
S
3
G
1
Posts: 154
Reputation: 1,812

Post » Thu May 09, 2013 5:52 pm

I don't 100% know, what you are trying to do...

lower the dt calculation, Example change 1.0*dt to 0.01*dt and adjust your "countdown" numbers accordingly, as this could skipping over your 1,2,3,4...
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260

Post » Thu May 16, 2013 7:09 pm

I gonna use a variable as trigger.
CD=2 and trigger=0 : DOTHAT and add 1 to trigger.
CD=3 and trigger=1 : DOTHAT and add 1 to trigger.
CD>10 and trigger=2: Reset CD and trigger.

SOLVED.
B
7
S
3
G
1
Posts: 154
Reputation: 1,812


Return to How do I....?

Who is online

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