Traps?

  • Thread starter Thread starter dem0n
  • Start date Start date
D

dem0n

Guest
I see that you can set traps on the maps such as "side fire trap" and "frost trap", etc.. but don't see any way of making them do anything. I don't see anywhere in any of the code anything for detecting if a unit is in a trap when it goes off.

Anyone know how to do this?
 
Good question for the FAQ.
I have wondered this too several times.

The only guess how to make it work is to make a trap region and a trigger like this:

event:
the unit enters (your trap region)

actions:
create (your trap type) at coordinates (...) facing (...) building degrees. or: make (select your trap on the map) visible

wait 0.2 seconds //the trap fire animation will be displayed once

set unit current life to (current life - trap damage)

remove (last created destructable?) from the game. or: make (select your trap on the map) invisible

This is for side traps.

(An easier way is to just create an explosion at the position of the triggering unit and reduce the triggering unit's hitpoints.)

I hope this is of use to you.
 
Why does someone always reply with "There is a good example in the free trigger code", yet I have looked through it several times and never see any such examples.

There is no trap example in the free trigger code.. at least none that have to do with what I'm asking.

I'm not trying to make some kind of hidden trap. That would be easy. I'm trying to use the visual cinematic traps that are included, so that people can see them going off and attempt to avoid them.

If they get caught by one, I would like it to cause some effect, such as damage on the fire traps and slow movement on the frost traps.

Thanks.
 
Well, we are just saying that there IS a great example by Mind of a damaging fire trap there --- I believe its on the first page. ANYWAYS, heres what I would do -

E: Every Five Seconds
C: N / A
A: create fire (I find that the fire one works better for my purposes instead of the fire trap) at center of [your trap region]

set last created doodad to (oh yes, go and add a special effects variable array too) [special effects array] [1]

sound - play fire burst

unit - pick every unit in [your trap region] and do set life of picked unit to life of picked unit - [how much damage you want unit to take]

wait 0.35 seconds

Remove [special effects array] [1]

Thats how you would create a damaging fire trap - you can even add other things to trigger it, like presssing a button or killing a lever. I used the above for my map actually. Hope this helps ;D
I find this easier to do than synchronizing it to the premade traps; you can still synchronize it to those if you want it, but this will give you roughly the same effect, abit bigger AOE and less fancy. I hope this will work for your purposes :D
 
Thats what were here for :D glad to help you ----------- you know it took me about an HOUR to get my frost trap right lol ... at first, if you stepped on the button then the guy stepping on to the button was killed while a perpetual flame burned in my other region lol so dont feel bad if you dont get it right the first time :D
 
General chit-chat
Help Users
  • The Helper The Helper:
    LOL! A tweak job!
  • The Helper The Helper:
    this is the fix I get from that yeah this is hard to control. disabling bots is pretty much necessary as ai and other bots would push really old threads to the top. reduce weight of view count. disable guest view tracking if you really want to push active threads to the top. a bit of tinkering for a few days with the weights and other settings should get you a decent trending widget box.
  • Ghan Ghan:
    I changed the settings a bit.
  • Ghan Ghan:
    Narrowed it to 7 days for the half-life and set views to 0 weight.
  • The Helper The Helper:
    I dont think Trending would work for this forum it would be better to just have the last 5 posts from anywhere
  • Ghan Ghan:
    Probably will have to give it some time to update.
  • Ghan Ghan:
    I'm guessing it is not retroactive.
  • Ghan Ghan:
    Next on the punch list: Update the server to Ubuntu 24.04.
  • The Helper The Helper:
    Mad Lads is new I see it displays original post date
  • The Helper The Helper:
    as long as it changes it is good - it is good now it updated and its new stuff
  • The Helper The Helper:
    One thing I have noticed and I dont know if it is by design but like 1 out of 3 times I come to the site the Anubis screen just hangs open, if I refresh it will go away but sometimes it hangs
  • Ghan Ghan:
    I've seen that as well.
  • The Helper The Helper:
    Wow - the change in the stats are major. I kind of knew it was all bots but wow, to see the effect. Why the social media sites cant do something like this I have no idea.
  • Ghan Ghan:
    Probably inflates their numbers so they look better to advertisers.
  • The Helper The Helper:
    Yeah google does not filter those bots. I remember when Apex was doing Google ads I saw the same IPs in there as I was seeing here - google is totally tracking all those bots as traffic and most google traffic, at least ours, was all bots
  • The Helper The Helper:
    oh wow, i bet i can post x links now and do the webp pics now giggity
  • The Helper The Helper:
    ahh anubis blocks anyone that has javascript turned off
  • The Helper The Helper:
    Robot: HTTP client library - i love the new robot :)
  • The Helper The Helper:
    New Science News Forum and it starts out with 420 threads :)
  • The Helper The Helper:
    Technical Support forum name changed To Technology News, there is now a Tech, sci/tech and science forums now :)
  • The Helper The Helper:
    Happy Saturday! Hope everyone has a fantastic weekend!
  • Ghan Ghan:
    We are now on Ubuntu 24.04. Had some issues with the style after the OS/PHP upgrade but now resolved.
    +1
  • Ghan Ghan:
    PHP 8.3 now live
    +1
  • The Helper The Helper:
    Weekend went by too fast. Next weekend I am going to try to do a nature thing - buddy of mine lives by the Colorado river and has some kayaks and invited me to do some kayaking from a place he knows to get on the river.

The Helper Discord

Staff online

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top