
Posts
560
Respect
430Add +1
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
self.num_bodies = 10;
self.bodie = randomint(self.num_bodies); // I was thinking I can change this to something but IDK
if(self.bodie == 0)
{
self setModel("bo2_c_zom_dlc0_zom_sol_body1");
self.headModel = "bo2_c_zom_dlc0_zom_head3";
self attach("bo2_c_zom_dlc0_zom_head3", "", true);
}
if(self.bodie == 1)
{
self setModel("bo2_c_zom_dlc0_zom_solciv_body1");
self.headModel = "bo2_c_zom_dlc0_zom_head4";
self attach("bo2_c_zom_dlc0_zom_head4", "", true);
}
..... so on and so on
check for a level variable that you set according to which trigger the player used
// Obviously a different number for every trigger
level.zombie_variant = 4;
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
targetname: hazmat_trig
zombie_variant: 1
targetname: prisoner_trig
zombie_variant: 2
main()
{
trig = getEnt("hazmat_trig", "targetname");
trig2 = getEnt("prisoner_trig", "targetname");
trig UseTriggerRequireLookAt();
trig sethintstring("Press F to Pickup Orb");
trig waittill ("trigger");
trig delete();
trig2 UseTriggerRequireLookAt();
trig2 sethintstring("Press F to activate block");
trig2 waittill ("trigger");
trig2 delete();
if(level.zombie_variant == 1)
{
self setModel("bo1_c_zom_cosmo_scientist_body");
self attach("bo1_c_zom_cosmo_scientist_head2", "", true);
}
if(level.zombie_variant == 2)
{
self setModel("bo2_c_zom_inmate_body2");
self attach("bo2_c_zom_zombie_hellcatraz_head", "", true);
}
self.voice = "german";
}
round_start()
{
activate_trig = getent ("start_rounds", "targetname");
activate_trig waittill ("trigger");
.....ect
}
main()
{
trig = getEnt("hazmat_trig", "targetname");
trig2 = getEnt("prisoner_trig", "targetname");
trig UseTriggerRequireLookAt();
trig sethintstring("Press F to Pickup Orb");
trig waittill ("trigger");
trig delete();
trig2 UseTriggerRequireLookAt();
trig2 sethintstring("Press F to activate block");
trig2 waittill ("trigger");
trig2 delete();
// the following are the spawners - each one needs to be seperate for this to work, or apart of an array if there are alot of them
// also, i think it would be better to specify each variant with a switch/case statement than an if statement for the same reasons
level.zombie_variant_1 = getEntarray("zombie_variant_1", "targetname");
level.zombie_variant_2 = getEntarray("zombie_variant_2", "targetname");
if(isdefined(level.zombie_variant_1) )
{
self setModel("bo1_c_zom_cosmo_scientist_body");
self attach("bo1_c_zom_cosmo_scientist_head2", "", true);
}
if(isdefined(level.zombie_variant_2) )
{
self setModel("bo2_c_zom_inmate_body2");
self attach("bo2_c_zom_zombie_hellcatraz_head", "", true);
}
// self.voice = "german"; an actors voice is declared by their spawner type(Aly/Axis)
}
I'm not sure if this is correct but I made my triggers with KVP's of:
level waittill("start_rounds");
level notify("start_rounds");
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |
start_zombies()
{
trig = getEnt("hazmat_trig", "targetname");
trig2 = getEnt("cell_trig", "targetname");
level.zombie_variant = 0;
if(isdefined(trig))
{
trig SetCursorHint("HINT_NOICON");
trig SetHintString("Press & Hold &&1 to Pickup Orb");
while(1)
{
trig waittill("trigger", user);
if( is_player_valid(user))
{
user playsound( "cha_ching" );
level.zombie_variant = 1;
level notify("start_rounds");
trig delete();
trig2 delete();
}
}
}
if(isdefined(trig2))
{
trig2 SetCursorHint("HINT_NOICON");
trig2 SetHintString("Press & Hold &&1 to Read Book");
while(1)
{
trig2 waittill("trigger", user);
if( is_player_valid(user))
{
user playsound( "cha_ching" );
level.zombie_variant = 2;
level notify("start_rounds");
trig delete();
trig2 delete();
}
}
}
}
![]() | Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager. |