View Full Version : Spawning Enemies
C-Dawg
11-26-2006, 12:57 PM
I'm not sure how this is done in the current Zscript. Is it yet possible to spawn enemies?
jman2050
11-26-2006, 08:56 PM
Yes. Use CreateNPC() to make a new enemy, then set the attributes of the resulting npcs like you would an item or FFC. Look in the ZScript documentation for details.
Also, I believe there's a topic in beta discussion where DN laid out the entire enemy definitions and constants, which should help in determining how you want to construct the enemy.
Yes, but when will setting NPC variables be implemented?
DarkDragon
11-27-2006, 11:13 AM
_L_, it should be working in b15. Is it not?
C-Dawg
11-27-2006, 12:10 PM
CreateNPC isn't working now. At least, the syntax isn't obvious.
This doesn't compile:
npc spawned_enemy = CreateNPC(enemy_id);
spawned_enemy->X = this->X
spawned_enemy->Y = this->Y
Compiler doesn't like the first line, says I need an identifier.
DarkDragon
11-27-2006, 12:26 PM
Yes, the NPC commands will be new in b15; I was pretty sure I'd added them before I left.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.