Creating Enemys OUTSIDE the layout

For questions about using Classic.

Post » Sun Jan 11, 2015 3:47 pm

hello,

so i got a 1280x720 playground and want to spawn every xxx random seconds 1 enemy OUTSIDE the layout. I tried alot of combinations but im confused if i have to use "scripts" like "system: create "enemy" on layer 1 at random x (xxx), random y (xxx).

I just dont know how i define the area outside the layout and neither if i should use sprites to spawn them there and just place them around my playground.

Since its an survival game i cant just allow them to spawn near my player.

Thx
B
4
S
1
Posts: 25
Reputation: 402

Post » Sun Jan 11, 2015 5:51 pm

If you want them to kinda spawn around the center of the stage you could just spawn them in the centre and as the next action use Move at an angle with a random angle and enough distance to put them outside. Then make them turn towards the middle and off you go.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Sun Jan 11, 2015 6:27 pm

Thx for the Answer,

but im not sure if i understand you correctly.
Could you give me an example on how it should look like ? :S
B
4
S
1
Posts: 25
Reputation: 402

Post » Sun Jan 11, 2015 6:47 pm

I don't have Construct Classic on this system, but just make the actions like I'm saying:
System: Create Sprite at the middle of your layout, say, 640x480
Sprite, move at an angle: Angle random(360), distance, 720
Sprite, set angle towards position: 640x480

Something like that, some of the wording may be different, haven't used CC in a while.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Sun Jan 11, 2015 7:27 pm

well move at angle isnt aviable for me or CC in generell.
Now i tried something else and it kinda works exepct for the distance. Maybe you could help me fix this instead.

i just made it like this: Create "enemy" on layer 1 at "X: Random(1280) Y: random(720)" and they spawn just like i want, expect for the distance.
B
4
S
1
Posts: 25
Reputation: 402

Post » Sun Jan 11, 2015 7:44 pm

Yes there is a MOVE AT ANGLE , you will find it at SIZE and POSITION under your sprite actions.
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 » Sun Jan 11, 2015 7:44 pm

Well, what is this then?
Image

It's under position.

And if that really isn't there, make sure you have the latest version: construct-classic-r2-released_t66915
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Sun Jan 11, 2015 7:53 pm

oooooh you are right ! im so sorry, and finaly it works !!! sorry for the effort guys :D
B
4
S
1
Posts: 25
Reputation: 402


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests