Help with spawning enemys and wildcard alternative

Get help using Construct 2

Post » Tue Jan 29, 2013 6:39 pm

I have two questions ,
1] In construct 2 expressions is there something representing similar to (*) astrick wildcard?

2] How do I make enemys spawn at a certain distance from the player (x pixels) every time the player covers a certain distance (y pixels).
B
8
S
1
Posts: 3
Reputation: 1,307

Post » Tue Jan 29, 2013 6:48 pm

1) In what context would you need this? I haven't really missed them myself so asking where you'd need to use them :)

2) Something like this:

player.distanceTravelled = y
..   create object enemy at (player.x - x, player.y)
..   player.distanceTralled = 0

Depending on how your player moves you'll need to add into distanceTravelled every tick.
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Wed Jan 30, 2013 4:13 am

[QUOTE=vee41] 1) In what context would you need this? I haven't really missed them myself so asking where you'd need to use them :)

2) Something like this:

player.distanceTravelled = y
..   create object enemy at (player.x - x, player.y)
..   player.distanceTralled = 0

Depending on how your player moves you'll need to add into distanceTravelled every tick.[/QUOTE]

2)Thanks, that solves it.

1) I don't really 'need' this but it would be better if I could use it in mathematical expressions, such as finding all the even numbers between certain intervals.
B
8
S
1
Posts: 3
Reputation: 1,307


Return to How do I....?

Who is online

Users browsing this forum: Kagubro, Yahoo [Bot] and 23 guests