Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: nikfar1 on July 28, 2018, 08:24:24 pm
Title: spawn boss from specific place
Post by: nikfar1 on July 28, 2018, 08:24:24 pm
hi I have a boss zombie in my map and I want to spawn from specific point(rise from well) in this script the boss spawn from every riser zombie near to player
spawn script code:
how to spawn it from one point?
Title: Re: spawn boss from specific place
Post by: codmoddd1234 on July 28, 2018, 11:57:15 pm
If you only need 1 struct for the boss you can add a kvp on a working riser struct "script_personality" "nikfarboss" Then in gsc you can use getstruct("script_personality","nikfarboss");
If you want multiple boss structs then use getstructarray and pick a random single struct from the array.
Title: Re: spawn boss from specific place
Post by: nikfar1 on July 29, 2018, 05:51:45 pm
thanks a lot codmoddd1234 I changed this line as you said: to this:
and the boss spawned from this point but 15 second after activating him. this lag of time for spawning happens after change this line why this Delay happened?
Title: Re: spawn boss from specific place
Post by: codmoddd1234 on July 29, 2018, 06:54:42 pm
Probably this.
for(t=0;t<teh_spawns.size;t++) { wait .05;
You dont need to sort the all the spawns now. Just get the struct and then spawn the ai. There is also wait 4; after the trigger is used.
Title: Re: spawn boss from specific place
Post by: nikfar1 on July 29, 2018, 08:00:40 pm
thanks for your help I changed "50" in this line to 2 and time fixed. (for(am=0;am<2;am++) but my first problem repaet again and the boss spawned from another place( this is not related to time problem). :'( and changing this line was useless.( spawn_points = GetStructArray("nikfarboss","script_personality"); ) I still have spawning from everywhere.. please h e l p
Spoiler: click to open...
sorry I thought my first problem was fixed
Title: Re: spawn boss from specific place
Post by: codmoddd1234 on July 29, 2018, 09:31:14 pm
if you are using a regular zombie spawner and then changing the model it probably still uses "add_spawn_function" to "zombie_rise" from zombiemode_spawner.gsc // Ill post a working solution when im home but if you want to try yourself then check in zombiemode_spawner do_zombie_rise() find where the script selects a random spot, check if self is the lion guy, and pick your new spot.
Title: Re: spawn boss from specific place
Post by: nikfar1 on July 30, 2018, 06:23:19 am
Thank you for your all help.I am not home.I ll test it later.