Okay so i have a code in which when activated by an alarm it creates an enemy (Penguin_O) to spawn somewhere random in the room
Only problem is sometimes they spawn way too close and kills my guy instantly..
Is there a code i can use to prevent them from spawning within a range of maybe 400 pixels of my character (Character_obj)
**My current code**
instance_create(100 + random(3800), 100 + random(2600), Penguin_O)
- Game Maker Community
- → Viewing Profile: Topics: lrmlrm
lrmlrm
Member Since 23 Jun 2012Offline Last Active Aug 09 2012 02:26 AM
Community Stats
- Group New Member
- Active Posts 22
- Profile Views 182
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
-
Version
GM8
0
none
Friends
lrmlrm hasn't added any friends yet.
Topics I've Started
Spawning Help
08 July 2012 - 09:44 AM
Enemies spawning to close
08 July 2012 - 09:38 AM
Okay so i have a code in which when activated by an alarm it creates an enemy (Penguin_O) to spawn somewhere random in the room
Only problem is sometimes they spawn way too close and kills my guy instantly..
Is there a code i can use to prevent them from spawning within a range of maybe 400 pixels of my character (Character_obj)
**My current code**
instance_create(100 + random(3800), 100 + random(2600), Penguin_O)
Only problem is sometimes they spawn way too close and kills my guy instantly..
Is there a code i can use to prevent them from spawning within a range of maybe 400 pixels of my character (Character_obj)
**My current code**
instance_create(100 + random(3800), 100 + random(2600), Penguin_O)
Image Number Confusion
06 July 2012 - 01:01 PM
So my game is a top view so my enemy uses 60 images to rotate 360 degrees to follow my character around the room.
Now I want a new sprite to come up when the enemy dies with just some blood covered and him fallen down. The new sprite has 60 images aswell for rotating but..
Only problem is I don't know how to make it face the same way it was when it was alive (using the other sprite)
So i was wondering if there was a code something like this to make it work..?
dead_enemy_obj = enemy_obj(image_index) ?
Now I want a new sprite to come up when the enemy dies with just some blood covered and him fallen down. The new sprite has 60 images aswell for rotating but..
Only problem is I don't know how to make it face the same way it was when it was alive (using the other sprite)
So i was wondering if there was a code something like this to make it work..?
dead_enemy_obj = enemy_obj(image_index) ?
Enemy Spawning Issue
04 July 2012 - 02:52 PM
Hey guys, Id love some help with this one
I have an enemy almost setup i just need help with the spawn system.
I have a room size of 4000 x 2800 but a view following my character of 1000x700
I want the spawn system to work so that my enemy can spawn anywhere random in the room except within maybe a 500px radius of my character.
Then i want to "spawn rate" to increase the longer you survive and then maybe a cap so it doesn't get too crazy
Feel free to just write down the code and send it and just specify what event and object it needs to go in.
Thanks in advance.
I have an enemy almost setup i just need help with the spawn system.
I have a room size of 4000 x 2800 but a view following my character of 1000x700
I want the spawn system to work so that my enemy can spawn anywhere random in the room except within maybe a 500px radius of my character.
Then i want to "spawn rate" to increase the longer you survive and then maybe a cap so it doesn't get too crazy
Feel free to just write down the code and send it and just specify what event and object it needs to go in.
Thanks in advance.
Enemy Spawning Help
04 July 2012 - 10:34 AM
Hey guys, Id love some help with this one
I have an enemy almost setup i just need help with the spawn system.
I have a room size of 4000 x 2800 but a view following my character of 1000x700
I want the spawn system to work so that my enemy can spawn anywhere random in the room except within maybe a 500px radius of my character.
Then i want to "spawn rate" to increase the longer you survive or maybe the more you kill the more that spawn.
Feel free to just write down the code and send it and just specify what event and object it needs to go in.
Thanks in advance.
I have an enemy almost setup i just need help with the spawn system.
I have a room size of 4000 x 2800 but a view following my character of 1000x700
I want the spawn system to work so that my enemy can spawn anywhere random in the room except within maybe a 500px radius of my character.
Then i want to "spawn rate" to increase the longer you survive or maybe the more you kill the more that spawn.
Feel free to just write down the code and send it and just specify what event and object it needs to go in.
Thanks in advance.
- Game Maker Community
- → Viewing Profile: Topics: lrmlrm
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content