It works fine but right now it will only spawn enemies in places that are touching absolutely no walls. I'd like to allow them to spawn anywhere except for when they are completely walled in on all four side, but am unsure how to write that.
Here's my current script. Any suggestions are much appreciated:
Code:
powerx := random(1,15)
powery := random (1,9)
create npc (20,powerx,powery)
alter NPC (20,NPCstat:move type,npcmovetype:pace)
alter npc (20,NPCstat:picture,5)
while (check npc wall (20,north) ,or, check npc wall (20,south) ,or, check npc wall (20,east) ,or, check npc wall (20,west)) do (
destroy npc (20)
powerx := random(1,15)
powery := random (1,9)
create npc (20,powerx,powery)
alter NPC (20,NPCstat:move type,npcmovetype:pace)
alter npc (20,NPCstat:picture,5)
)
powery := random (1,9)
create npc (20,powerx,powery)
alter NPC (20,NPCstat:move type,npcmovetype:pace)
alter npc (20,NPCstat:picture,5)
while (check npc wall (20,north) ,or, check npc wall (20,south) ,or, check npc wall (20,east) ,or, check npc wall (20,west)) do (
destroy npc (20)
powerx := random(1,15)
powery := random (1,9)
create npc (20,powerx,powery)
alter NPC (20,NPCstat:move type,npcmovetype:pace)
alter npc (20,NPCstat:picture,5)
)
Cornbread Chemist



