Almost Amazing Bridge Trick

HG-Bonfire

New Member
Reaction score
22
k in a response to this request. I decided to try and conquer the walking under bridges problem, and I think im close to getting the wooden bridges to work! Heres the idea, when a unit enters a region next to the bridge, the bridge gets replaced by a dummy unit which looks identical to it. When the unit enters another region, the dummy unit is removed and the bridge is placed again. Now unfortunatly due to a bridge modeling thing, only the wooden bridge can sucessfully do this.

heres the triggers

Code:
Initialization
    Events
        Map initialization
    Conditions
    Actions
        Set Bridge = Short Wooden Bridge (Horizontal) 0000 <gen>
        Set Pointof_Bridge = (Position of Short Wooden Bridge (Horizontal) 0000 <gen>)

Code:
Bridge On
    Events
        Unit - A unit enters Enter 1 <gen>
        Unit - A unit enters Enter 2 <gen>
    Conditions
    Actions
        Destructible - Remove Bridge
        Unit - Create 1 Bridge for Neutral Passive at Pointof_Bridge facing 270.00 degrees
        Set FakeBridge = (Last created unit)
        Animation - Change FakeBridge flying height to -2000.00 at 0.00
        Trigger - Turn off (This trigger)
        Trigger - Turn on Bridge Off <gen>

and

Code:
Bridge Off (initially off)
    Events
        Unit - A unit enters Exit 1 <gen>
        Unit - A unit enters Exit 2 <gen>
    Conditions
    Actions
        Unit - Remove FakeBridge from the game
        Destructible - Create a Short Wooden Bridge (Horizontal) at Pointof_Bridge facing 180.00 with scale 1.00 and variation 0
        Set Bridge = (Last created destructible)
        Trigger - Turn off (This trigger)
        Trigger - Turn on Bridge On <gen>

The only problem is that no matter how much i lower the flying height of the unit, it is floating above where its supposed to be. Is it possible to get it to go lower? and the trigger function Animation - Change flying height doesnt seem to be doing anything.
 

Effane

Save/Load Code Tutorial
Reaction score
51
Dont you think maybe you could create a bridge using a doodad and give it no pathing template or size then just swap those two back and forth. You can keep players from waltzing through the bridge sides by just using some doodads like busshes and rocks.
 

HG-Bonfire

New Member
Reaction score
22
Good idea, Ill try that.

[EDIT] nope if the replacement bridge is a destructible, the units will walk over it, not under.
 

Effane

Save/Load Code Tutorial
Reaction score
51
How about this... I made you a fake wooden bridge you can walk through.

Its a Doodad, based off the Double Column model and angled, its not a bridge type at all.

And with that thought, off to bed I go. Between TH.net and my RPG map, I am going to lose alot of sleep. :rolleyes:
 

Attachments

  • RealAndFakeBridge.w3x
    21.4 KB · Views: 85

Effane

Save/Load Code Tutorial
Reaction score
51
Can you post a demo map of the finished product? I would like to see the whole thing in action. :)
 

Rabarber

You can change this now in User CP.
Reaction score
94
How are units supposed to walk over the bridge at the same time?
 

Mullit

New Member
Reaction score
51
I got close to this too. unfortunately you cant have units wlaking over and under at the same time. Also there is a small problem, whenever the unit goes to walk under the bridge it appears to jump up onto the bridge walk accross it and then fall down on the other side. Heres a link to the thread with what i had in it http://www.thehelper.net/forums/showthread.php?t=32199.
If you ever find a way to fix it please post
 

Effane

Save/Load Code Tutorial
Reaction score
51
Maybe we can get close though. How about a meld of the two ideas.

We can make a boolean lock for the bridge. We would have two regions up top, TopARegion and TopBRegion. Then have 4 regions down on the bottom. Bottom ABCD. Now when a unit enters TopA or TopB it will lock the bridge with a boolean variable so the bridge cannot be altered. Then the bottom units will be ported under the bridge. But when there is no unit in the top, then the bridge will be altered, and no porting will happen. Timing will be hard, and the map would be sculpted in this spot for the regions to give max coverage.

I hate getting 80% of the way there and still not getting it though. Would be a fun feature for all kinds of maps to have fully working two layer bridges.
 
O

OmgWtfBacon

Guest
Ack! I think I just might stick with Unit enters region, transport unit to other side of bridge region. :p :D
 

Sooda

Diversity enchants
Reaction score
318
Or make two regions to each side of bride and add air pathing blockers to bridge sides. Now if unit enters from top into "bridge region" he gets flying with exact fly eight of bridge so it looks like he is "walking" on it air pathing blockers prevent these "flying" units from going over edges of bridge. If unit leaves from one region then remove "flying" back to ground. With conditions can be set that only ground units are affected. So bridge is always etheral.
Just idea dunno if it works or is best to make two layer bridges. It depends on map type too, if it is melee map it not so good idea if it' s for RPG it sounds good.
EDIT: Who didn' t figure out for smooth moving with "fly" unit animation has to calculated from bridge entering sides so it looks like he actualy walks on bridge.
Combined "jumping" spell animation with "slide" spell distance calculation to get right eight of unit on bridge.
 

HG-Bonfire

New Member
Reaction score
22
well i tried making a fake bridge based off the Barrel model, but it still is doing the jump over the bridge thing.
 

Effane

Save/Load Code Tutorial
Reaction score
51
Yeah, I made a dozen different models and each time they either were unable to move across or they couldnt stand on it.

Sadly, you just cant have two layers of pathing for the same thing.

Really though, even an RPG map wouldnt need this. Basically only two types of maps are dying for this to work some how. TDs and Minigame or racing games.

FLying is a decent idea though, but dont flying units not walk animate?
 

Sooda

Diversity enchants
Reaction score
318
FLying is a decent idea though, but dont flying units not walk animate?
I don' t get what you mean, sry. Using slideing effect they walk too with animate but you can attack and cast spell on them and they die if their life gets 0 hp. It is doable with conditions check if they are going to die on bridge somehow.
 

Rinpun

Ex TH Member
Reaction score
105
All flying units animate perfectly at their position. If they die on top of the bridge, they will die "on" the bridge. Of course, through poor animation, they might fall into the bridge a little bit :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top