How do I make objects spawn/drop only one object a time?

Get help using Construct 2

Post » Fri Jun 06, 2014 7:20 pm

Hello all, I was wondering... How do I make it so that spawns drop only one object a time? For example, when my main character collides with a ghost, the ghost will drop/spawn a spellbook. The problem is that when the character collides with the ghost, it will sometimes spawn two or three spellbooks instead of just one:( How do I make it so that the ghost will spawn only one spellbook at a time when the character collides with it?

Thanks,
guannstar (Fnord)
Last edited by guannstar on Fri Jun 06, 2014 7:27 pm, edited 1 time in total.
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Post » Fri Jun 06, 2014 7:26 pm

Trigger once while true
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 » Fri Jun 06, 2014 7:28 pm

Thanks, can you show me what the code path look like? How do you "Trigger once while true"?
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Post » Fri Jun 06, 2014 7:41 pm

Add this condition to the event where the main character collides with the ghost....
>character on collision with ghost
>trigger once action > ghost spawn book

Trigger once while true
Turn an ordinary event (which is tested every tick) in to a trigger. For example, if an event plays a sound when lives equals 0, normally this event runs every tick. This plays about 60 sounds a second and would sound pretty bad. Adding Trigger once while true after the other conditions makes the event run just once when it first becomes true. This makes the previous example only play a sound once the first time your lives reaches 0. It must be the last condition in an event.
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 » Fri Jun 06, 2014 7:56 pm

Thanks a lot, I'll try that and get back to you:)
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Post » Fri Jun 06, 2014 8:32 pm

Hey, I'm trying to add a condition to ">character on collision with ghost", but there's no ">trigger once action" option available. What should I do?
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Post » Fri Jun 06, 2014 8:48 pm

Do you know what I'm saying? Do I have to make it a sub-event or something? Why can't I just add a condition?
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Post » Fri Jun 06, 2014 8:51 pm

When I try to add a condition, it says, "Due to the restrictions on triggers, some conditions could not be pasted here.":(
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Post » Fri Jun 06, 2014 10:22 pm

Bump, please guys, I really need some help:(
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Post » Fri Jun 06, 2014 11:16 pm

Bump.
B
36
S
9
G
1
Posts: 629
Reputation: 3,956

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 40 guests