Terrain Penalties

  • Thread starter Thread starter team.ism
  • Start date Start date
T

team.ism

Guest
I want to make a trigger that decreases a players helath if they are standing on lava terrain. (from the dungeon tileset)
Also, I want to make it take no damage if the unit has a certain item, say some magic lava walkin' boots.

I cannot find an event that start when a unit walks on a certain terrain. Any ideas?
 
This is one of those moments when you need a "Time - Every (really small amount of) seconds of game time", like 0.1, 0.3, 0.5...
Then check for every unit if they stand on a specifical tileset with the condition "(Terrain type at (Position of (Picked unit))) Equal to Underground - Lava"
Also check for the units that have an item.

I think it should lag your map a lot, so I'd rather prefer to create regions for every not-wanted-to-cross path, check for Entering units and deal damage to those units every second until they leave the region.
It involves more triggers and also a "Every 1.0 second of game time" but it only picks the units that entered a forbidden zone.

If I'm not explaining it good, ask me to post some triggers and I will do :)
 
There is a trigger in the Free Trigger Code thread (Stickyed) which has some very similar concepts to this - it is on Page 4. I think it is slighly different in the end action, but the whole "tile penalty" thing is the same - check it out.
 
there is a similar trigger in my maze tutorial but it wont do exactly what you want it to do, but killfest is right, there is one in the free trigger code thread.

Look there and then you should find it.

Hope this helps, good luck.

~Jindo
 
Here's the exact extract of his post in the 'Free Trigger Code' thread, Page 4.

husky_003 said:
Hi,
Okay I was using this trigger in my map and I just thought that some of you may find it useful...
Code:
Can't/Can Build on Terrain Type
    Events
        Unit - A unit Begins construction
    Conditions
        (Unit-type of (Triggering unit)) Equal to *Your Building*
        (Terrain type at (Position of (Triggering unit))) Not equal/Equal to *Your Terrain*
    Actions
        Unit - Remove (Constructing structure) from the game
        Player - Add *cost of buildings gold* to (Picked player) Current gold (becuase it costs 50 gold, and to get money back) 
        Player - Add *cost of buildings lumber* to (Picked player) Current lumber

Another thing is goto Object Editor>Your Building>Pathing Placements, you can change stuff here so that you can build buildings on unbuildable terrain.

Thanks to AgentPaper for the Trigger idea, although the Trigger was created by me.
Hope that helps,
-Husky

Obviously, you will change the actions, and probably alter the event slightly, but the conditions and the general trigger is right, just a few minor changes.

- Killfest2
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Bot readable, not human usable.
  • The Helper The Helper:
    got it
  • The Helper The Helper:
    Happy Thursday!
  • The Helper The Helper:
    Check out the new Featured Content feature we apparently got with the forum software upgrade! https://www.thehelper.net/featured/
  • The Helper The Helper:
    Also on the bottom right side bar we now have a Trending Content Box!
    +1
  • The Helper The Helper:
    Not on the Headline News page just on the Forums page can we get that Featured and Trending on the home page?
  • Ghan Ghan:
    Since the home page is technically a forum, it now shows on all forum views. Still in the sidebar.
    +1
  • The Helper The Helper:
    Happy Friday! Hope everyone has a fantastic day and an even better weekend!
  • The Helper The Helper:
    Happy Sunday!
  • The Helper The Helper:
    I lovc that I can post webp and X links now! :)
  • The Helper The Helper:
    Happy Thursday!
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    we were down for a minute - think a log file or something got too big
    +1
  • Ghan Ghan:
    The alerts say it was down for a while unfortunately.
  • Ghan Ghan:
    Didn't know what was going on while I was at work.
  • Ghan Ghan:
    Disk filled up with logs. Fixed now.
    +1
  • The Helper The Helper:
    not a problem at all thanks for getting us back up
  • The Helper The Helper:
    I think the bots are finding a way to get through the anubis
  • The Helper The Helper:
    Happy Wednesday Everyone! Hope everyone has a Fantastic Day!
    +1
  • The Helper The Helper:
    Yeah, stats are showing big bot influx like 12k page views.
  • Wizard Wizard:
    :wave:
    +1
  • Ghan Ghan:
    TH changed his avatar again. 6 more weeks of summer.
    +3
  • Wizard Wizard:
    lol
    +1
  • The Helper The Helper:
    Guys just a heads up I am going to be shutting the site down soon. I am just waiting on the NUON people to decide whether they want to transfer forum data and keep the discord. My email is [email protected] for anyone that wants to keep in touch and I have a facebook too. I will make an official post later. Love you guys and will miss everyone!
    +1
  • V-SNES V-SNES:
    Sent a pm @The Helper

The Helper Discord

Staff online

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top