(SOLVED) Yet another Object Count question

New releases and general discussions.

Post » Wed Jan 14, 2015 12:46 am

Hi there,
i checked the object count threads to find a solution to my problem but it just dont works for me.
i need a simple counter event

Every random seconds will create an enemy, now want every single enemy add once 1 to my global "current enemys" var.
Every enemy is exactly the same sprite, i tried it with the familie thingy but i cant get into it.
so i heard something like:

1. For each "enemy" -
*subevent* Trigger once - add 1 to global variable XXX

----
i also tried alot of other stuff but i just keep failing on this.

now i have the feeling as soon as the second enemy is created, the trigger once event is broken and every 1 or few MS it adds another 1 to my global var.

Would be nice if u could help me there. And if this is the case, pls make go more into detail like i did for the events :P

Thx and good night.
Last edited by sassix on Wed Jan 14, 2015 2:03 pm, edited 1 time in total.
B
4
S
1
Posts: 25
Reputation: 402

Post » Wed Jan 14, 2015 1:07 am

This might help,,,,,,,,,
You do not have the required permissions to view the files attached to this post.
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Wed Jan 14, 2015 1:47 pm

thx for the answer but if i try to open it, it says it was made in a newer version of construct and cannot be open.
I also checked for updates via "check for updates" inside the programm and the newest version is r1.2 :/
B
4
S
1
Posts: 25
Reputation: 402

Post » Wed Jan 14, 2015 1:56 pm

What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Wed Jan 14, 2015 1:57 pm

aah awsome, thanks !
but this is the easiest way, i dont know if this works with my settings since my enemys get spawned at random times. Or does it trigger every time a enemy is created ?

EDIT:
Yep it just works fine ! thx for the fast help and the download link !
B
4
S
1
Posts: 25
Reputation: 402

Post » Wed Jan 14, 2015 2:18 pm

No problem , just ask if you need any more help and good luck on your game :)
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 5 guests