UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Interactive fire help!

broken avatar :(
Created 10 years ago
by Noahst
0 Members and 1 Guest are viewing this topic.
4,257 views
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Signature
If you enjoy my work, feel free to donate!

https://www.paypal.me/Stainbrook762
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
Ok, so I need some help with interactive fire. Two things in specific: I want zombies to catch fire when they walk through a trigger that's placed over the fire (the way it's set up now they just catch fire at spawn and I don't know why, so if someone doesn't have their own way I'll post the scripts I've added). And I would like to know how to set it to catch the player on fire when they walk through the fire, like in nacho der untoten. But with a hurt trigger. Any help is appreciated!
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
With zombies it's easy, just a dodamage in a function with some checks, but for players you need to check their health, and if it will down them, do a radius damage instead.

I think I used .is_on_fire before to set things on fire, zombies, players, but can't check right now. You can use setburn for the players to get a flame screen.
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
Right but that doesn't actually harm the olayer...as far as the zombies go that's what I've attempted but I've clearly done something wrong because they just spawn already on fire and the flame triggers don't do anything..give me a bit I'll post my spawner.gsc and mapname.gsc. (the scripts I added the code to)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
K, cool. I'd use a trigger multiple myself, is that what your using. If it us undefined, probably a typo or something, it would cause unexpected issues.
Last Edit: April 23, 2016, 03:23:40 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
info volume is what im using..here the scripts

spawner.gsc

self thread maps\nazi_zombie_dark_christmas::zombie_flame_watcher();

this is under these lines

self random_tan();
self set_zombie_run_cycle();
self thread zombie_think();
self thread zombie_gib_on_damage();
self thread zombie_damage_failsafe();

and these lines

self notify("rise_anim_finished");
spot notify("stop_zombie_rise_fx");
self.in_the_ground = false;
self notify("risen", spot.script_noteworthy );

mapname.gsc
zombie_flame_init(){

   triggers = GetEntArray("zombie_flame_trigger", "targetname");
   level._firetriggers = triggers;
   
}

ombie_flame_watcher(){

   self endon("death");
   
   while(1){
   
      for(i=0;i<level._firetriggers.size;i++){
   
         if(self IsTouching(level._firetriggers) && !isDefined(self.on_fire)){
         
            // zombie is touching fire trigger :o spawn fx!
            PlayFxOnTag(level._effect["character_fire_death_torso"], self, "j_spine4");
            PlayFxOnTag(level._effect["character_fire_death_sm"], self, "j_neck");
            
            self.on_fire = true;      

            wait(0.5);
      
            self waittill("death");
         
         }
         
         // zombie isnt touching fire trigger :(
         wait(0.5);         
      
      }
      
   }

}

this is right under my fx precache
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
You only need to thread it once per zombie, but either way, the first error I see is this

Code Snippet
Plaintext
if(self IsTouching(level._firetriggers) && !isDefined(self.on_fire))

You're missing the i after level._firetriggers

Code Snippet
Plaintext
if(self IsTouching(level._firetriggers[i]) && !isDefined(self.on_fire))

I would use a trigger and thread a function on trigger, determine if it is player or zombie, check if on fire, and so on. Plus I think setting the object.is_on_fire = true sets things on fire. Can't remember specifically.
Last Edit: April 23, 2016, 03:52:35 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
well i have the fire fx working, it just doesnt interact with the environment. let me go implement the code you gave me ill be right back
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
well i have the fire fx working, it just doesnt interact with the environment. let me go implement the code you gave me ill be right back

K, it was setting them on fire right away because the error you had was trying to see if it was touching the entire array, instead of checking each volume, which made it pass as true and set them on fire.
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
no dice...id actually had that changed in the script from before i just posted the original backup script..is is because im using an info volume instead of a trigger?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
no dice...id actually had that changed in the script from before i just posted the original backup script..is is because im using an info volume instead of a trigger?

That should have been your issue. You'll have to add some prints, see what is going on, make sure everything is defined
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
prints?
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 10 December 2013
Last active: 4 years ago
Posts
159
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Linoxet's Groups
Linoxet's Contact & Social LinksTutizillalinoxetbanguela
prints?

Code Snippet
Plaintext
iprintln("everything is ok");
  ;D
Last Edit: April 23, 2016, 05:02:12 pm by Linoxet
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
ahh lol i was lost XD
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Yeah, it's setting them on fire when it shouldn't be so one of those conditions are passing as true, or error, when it shouldn't.

I was thinking something more like this:

Code Snippet
Plaintext
Init(){
    flame_triggers = GetEntArray("flame_triggers", "targetname");
    array_thread(flame_triggers,::FlameTrigger);
}
FlameTrigger(){
    while(1){
        self waittill("trigger", ent);
        if(!isdefined(ent.flamedamage) || ent.flamedamage == false){
             ent thread SetFire();
        }
        wait .05;
    }
}
SetFire()
    FireDamage = 20;
    self.flamedamage = true;
    if(self isPlayer() && self.health<=FireDamage){
        if(!isdefined(self.revivetrigger)){
            //RadiusDamage

        }

    }else{
        //Dodamage

    }
    self thread HandleFire();//stay on fire for a little after damage
    wait .5;// damage every .5 seconds
    self.flamedamage = undefined;
}
HandleFire(){
    self endon("death");
    self notify("putout");
    self endon("putout");
    self.is_on_fire = true;
    wait 3;//how long to be on fire for
    self.is_on_fire = false;
}

This isn't tested, or completed, just did it in my phone. The theory is what I mean, using trigger multiples.
Last Edit: April 24, 2016, 12:15:21 am by MakeCents
broken avatar :(
×
broken avatar :(
Location: usMeadville, Pennsylvania
Date Registered: 12 August 2014
Last active: 6 years ago
Posts
195
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Noahst's Groups
Noahst's Contact & Social LinksNoah4518Noah StainbrookNoah115007Noah stainbrook
Hmm ill give this a try!! thank you!

Double Post Merge: April 24, 2016, 05:10:55 pm
The console says entry thread setfire (); is an unrecognized function (I copied and pasted that, if the colon us off in this message ignore that)
Last Edit: April 24, 2016, 05:10:55 pm by Noahst

 
Loading ...