UGX-Mods

Call of Duty 5: World at War => Help Desk => Mapping => Topic started by: suckafoola on August 12, 2015, 02:51:58 am

Title: player kill zone
Post by: suckafoola on August 12, 2015, 02:51:58 am
Is there some tool, or something, that I can use to put in a small area that instantly downs players? For example, if they fall in a pit they would get downed, how can I do that?
Title: Re: player kill zone
Post by: Harry Bo21 on August 12, 2015, 02:56:18 am
big drop with a floor at the bottom would do this "anyway"
Title: Re: player kill zone
Post by: suckafoola on August 12, 2015, 02:58:42 am
Yeah, but what if I want to add PhD Flopper to my map
Title: Re: player kill zone
Post by: Harry Bo21 on August 12, 2015, 03:00:08 am
trigger radius at the bottom

Code Snippet
Plaintext
waittill( "trigger", user );
user doDamage( 666 );

off the top of my head
Title: Re: player kill zone
Post by: suckafoola on August 12, 2015, 03:01:49 am
Does "waitttill" really need three T's or is it a typo?

And thanks a lot :)

Double Post Merge: August 12, 2015, 03:02:18 am
Oh and where would I add that code?
Title: Re: player kill zone
Post by: Harry Bo21 on August 12, 2015, 03:03:22 am
Does "waitttill" really need three T's or is it a typo?

And thanks a lot :)

Double Post Merge: August 12, 2015, 03:02:18 am
Oh and where would I add that code?
ill let you work that out, i merely dropped the functions your gonna "need" to do it ;)
Title: Re: player kill zone
Post by: JBird632 on August 12, 2015, 03:04:01 am
trigger radius at the bottom

Code Snippet
Plaintext
waittill( "trigger", user );
user doDamage( 666 );

off the top of my head
No bad harry... lol That will restart the map on coop, you need to use a radius damage.
Title: Re: player kill zone
Post by: suckafoola on August 12, 2015, 03:05:42 am
Thanks to both of you. I'm still kinda new to this, so I don't really know where it's supposed to go. :/
Title: Re: player kill zone
Post by: Harry Bo21 on August 12, 2015, 03:43:39 am
No bad harry... lol That will restart the map on coop, you need to use a radius damage.
lol oh yea, thats what causes the glitch on that other map with the death pit isnt it

my bad ;)
Title: Re: player kill zone
Post by: vinnyz500 on August 12, 2015, 04:08:24 am
Code Snippet
Plaintext
//Add this here 
main()
{
//these 2 lines below
trigs = GetEntArray("damage_trigger", "targetname");
array_thread(trigs, ::damage_trigger_think);
(for reference) level.DLC3 = spawnStruct(); // Leave This Line Or Else It Breaks Everything
Then this at the bottom
Code Snippet
Plaintext
// At the end of mapname.gsc
damage_trigger_think()
{
    damage = 20;
    while(true)
    {
        self waittill("trigger", player);
        if(player maps\_laststand::player_is_in_laststand()) continue;
        if(player.health > damage)
            player DoDamage(damage, player.origin);
        else
            RadiusDamage(player.origin, 10, player.health + 10, player.health + 10);
    }
}
Creds to YaPh1l i think, old script i got. Uses trigger_damage or touch or one of them, i forget

I think this is his too, instead of it killing the player it teleports them
Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;

main()
{
    entTransporter = getentarray( "enter" , "targetname" );
if(isdefined(entTransporter))
    for( i = 0; i < entTransporter.size; i++ )
entTransporter[i] thread transporter();
}

transporter()
{
    for(;;)
{
    self waittill( "trigger", player );
entTarget = getEnt( self.target, "targetname" );
wait 0.1;
player setOrigin( entTarget.origin );
player setplayerangles( entTarget.angles );
wait 0.1;
iprintlnbold("text on screen");
}
}
These are quite old and i dont think he would mind me sharing them as their quite barebones. I mean mabey they arent Yaph1l's but i know one of them is
Title: Re: player kill zone
Post by: Harry Bo21 on August 12, 2015, 04:10:52 am

scratch that, i read it backwards lol