Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

ok one more issue...

2 replies · 1,530 views · Started 03 April 2008

i think i just placed it in the wrong place, but...

i set up a script to create 2 enemies.

however, i test it in a quest and BAM

like a thousand enemies pop out of the corner of the screen.

i placed the spawning in the while loop though... that might have something to do with it...

is there a screen->reset room function?

that would help a lot.

but if there isnt, can you tell me gow to fix this problem?

Don't use a loop. Or simply add these two lines into your code:

if(Screen->NumNPCs()<x){ //spawn enemies.
}
else Quit(); //and
enemy->X = x loc
enemy->Y = y loc

hmmm... thank you gleeok =)

this will work wonders XD

ill just have to combine the script into this then.

in the NumNPCs(), could i place a certain NPC ID in the parentheses and have it only when the number of a certain NPC is less than whatever?

like this

if(Screen->NumNPCs(m)<x){

?

also

how od i tell it to "stop the script"? not like waitframes, but like completely end the script altogether.

EDIT: also gleeok, doesent setting the coordinates like that disable the enemy's movement? it would set it to that every frame, wouldnt it?