AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   EngFunc_CreateNamedEntity problem. (https://forums.alliedmods.net/showthread.php?t=55031)

Silencer123 05-11-2007 16:39

EngFunc_CreateNamedEntity problem.
 
Code:
ent=engfunc(EngFunc_CreateNamedEntity,"weapon_uziakimbo")
This results in "Can't create entity: " being printed into my console and creating
the most impressive entity bugs I have ever seen. Monsters fall through the floor.
Items hop around. Gibs float. Monsters go invisible or shoot through walls. The only thing I
missed was myself being transformed into a flying gargantua sprite with wings.
:shock:
The cause probably is that where i wrote "weapon_uziakimbo" there is meant to
be an integer, so fakemeta_const.inc say - but how can a number be a specific entity
classname? Does each predefined classname in a game/mod have its own number with it?
What is this number then? *confused*
Oh and I can NOT use the give_item function for this,
because I have to set this entities spawnflags to 1024 to disable respawn.

mateo10 05-11-2007 17:02

Re: EngFunc_CreateNamedEntity problem.
 
Don't you have to do
Code:
ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "weapon_uziakimbo"));

Silencer123 05-12-2007 06:08

Re: EngFunc_CreateNamedEntity problem.
 
Thanks, I just did not know about how to return the correct number.


All times are GMT -4. The time now is 06:45.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.