oylmeo
Posts
94
Respect
20Add +1
Forum Rank
Rotting Walker
Primary Group
Member
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!lol, i thought the trigger was somewhere else in the map.. I'll change it up a bit
Double Post Merge: March 28, 2015, 03:33:18 pm
k, here we go once more
in radiant:
1- delete the triggers,
2- select the moving thingy's and give them the targetname - moving_wall
-keep the script_vector and count KVP
3- use this script
(the doors dont take melee damage or grenade damage) Code SnippetPlaintextmoving_walls()
{
walls = getentarray( "moving_wall", "targetname" );
array_thread( walls,::setup_moving );
}
setup_moving()
{
self endon( "i_have_been_shot" );
self thread wait_for_hits();
for( ;; )
{
self moveto( self.origin+self.script_vector, self.count, 0, 0 );
wait self.count;
self moveto( self.origin-self.script_vector, self.count, 0, 0 );
wait self.count;
if( !isdefined( self ) )
break;
}
}
wait_for_hits()
{
self setcandamage( true );
for( ;; )
{
self waittill( "damage", amount, attacker, dir, org, mod );
if( !isplayer( attacker ) )
continue;
if( mod == "MOD_GRENADE" || mod == "MOD_GRENADE_SPLASH" || mod == "MOD_MELEE" )
continue;
break;
}
self notify( "i_have_been_shot" );
self setcandamage( false );
play_sound_at_pos("door_slide_open" , self.origin);
self movez(-200,5);
self waittill( "movedone" );
self delete();
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |
Uh,well i now have no triggers for it in radiant,da kvp's are targetname - moving_wall , script_vector - 100 0 0 , count 3
It moves,but doesn't go away when i shoot it
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |
moving_walls()
{
walls = getentarray( "moving_wall", "targetname" );
array_thread( walls,::setup_moving );
}
setup_moving()
{
self endon( "i_have_been_shot" );
self thread wait_for_hits();
for( ;; )
{
self moveto( self.origin+self.script_vector, self.count, 0, 0 );
wait self.count;
self moveto( self.origin-self.script_vector, self.count, 0, 0 );
wait self.count;
if( !isdefined( self ) )
break;
}
}
wait_for_hits()
{
self setcandamage( true );
attacker = undefined;
for( ;; )
{
self waittill( "damage", amount, attacker, dir, org, mod );
if( !isplayer( attacker ) )
continue;
if( mod == "MOD_GRENADE" || mod == "MOD_GRENADE_SPLASH" || mod == "MOD_MELEE" )
continue;
break;
}
attacker maps\_zombiemode_score::add_to_player_score( 1000 );
self notify( "i_have_been_shot" );
self setcandamage( false );
play_sound_at_pos("door_slide_open" , self.origin);
self movez(-200,5);
self waittill( "movedone" );
self delete();
}
Code SnippetPlaintextmoving_walls()
{
walls = getentarray( "moving_wall", "targetname" );
array_thread( walls,::setup_moving );
}
setup_moving()
{
self endon( "i_have_been_shot" );
self thread wait_for_hits();
for( ;; )
{
self moveto( self.origin+self.script_vector, self.count, 0, 0 );
wait self.count;
self moveto( self.origin-self.script_vector, self.count, 0, 0 );
wait self.count;
if( !isdefined( self ) )
break;
}
}
wait_for_hits()
{
self setcandamage( true );
attacker = undefined;
for( ;; )
{
self waittill( "damage", amount, attacker, dir, org, mod );
if( !isplayer( attacker ) )
continue;
if( mod == "MOD_GRENADE" || mod == "MOD_GRENADE_SPLASH" || mod == "MOD_MELEE" )
continue;
break;
}
attacker maps\_zombiemode_score::add_to_player_score( 1000 );
self notify( "i_have_been_shot" );
self setcandamage( false );
play_sound_at_pos("door_slide_open" , self.origin);
self movez(-200,5);
self waittill( "movedone" );
self delete();
}
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() Oil Rig Beta Access |
sure, np. Thought i was going to see a shooting range in that vid tbh.
Make sure to mark one of them as best answer