• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How can i make a cave port you to another cave?

Status
Not open for further replies.
Level 2
Joined
Oct 13, 2008
Messages
6
Title says it all.. I want to make the region 000 port you to region 001 via CAVES :)

The problem is.. i dont want to use - Way gate *doesnt provide the right cave model*

=/ im confused.


Thanks! +rep to anyone who helps
 
Level 2
Joined
Oct 13, 2008
Messages
6
Where can i find the setemp point - 001 .. 1st part in the action

EDIT:
.bump =/ last post was helpful but i have no idea where to find set tempoint = center of rect 001
 
Last edited by a moderator:
Level 2
Joined
Oct 13, 2008
Messages
6
ok, i made the variable, where do i go about after that? +++Rep if you can help me man.. Im way confused
 
Level 2
Joined
Oct 13, 2008
Messages
6
lol.

EDIT1:
It says.. error - line 499 (exspected a name) how do i resolve

EDIT2:
Oh.. it says Custom script: call RemoveLocation(udg_temppoint)

what am i suppost to type? i copy / pasted what you types
 
Last edited by a moderator:
  • Angry
Reactions: Rui
Level 12
Joined
Apr 15, 2008
Messages
1,063
Or you could use some kind of dummy invisible gateway, with target set on the other cave.
If it's invisible (or better without a unit model), player's can't activate it manually, but units will still use it automatically, if it's the shortest way.
EDIT: It works, you just need to remove the teleportation effect.
 
Level 4
Joined
Aug 1, 2007
Messages
66
This is a trigger I use to teleport units:

  • King Portal
    • Events
      • Unit - A unit enters King Portal <gen>
    • Conditions
      • ((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True
    • Actions
      • Unit - Move (Triggering unit) instantly to (Random point in Portal 1 <gen>)
      • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of Portal 1 <gen>) over 0.20 seconds
King Portal is the region they're teleported from and Portal 1 is the region they're teleported to. I have seperate portals for each team so there are some conditions here you may not need. Instead of "Random point in Portal 1" you could just do the "Center of Portal 1" to make them come out in a more specific area. As for it going from cave to cave, I don't see why it would matter. Just keep resizing and repositioning your regions until it looks and works right to you.
 
Last edited:
Level 2
Joined
Oct 16, 2004
Messages
16
Just as a quick sidenote, if you're going to use caves as teleporters, you should make it clear to the player. A lot of mapmakers just make caves benign doodads, so make sure to display a floating text with a hint when they come within range of the cave... Or use a little doodad like "Invulnerability Field" (Dalaran Ruins - Cinematic) outside of it to indicate it's special.
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
  • Events
    • Unit - A unit enters Rect 000 <gen>
  • Conditions
  • Actions
    • Set temppoint = Center of Rect 001 <gen>
    • Unit - Move (Triggering Unit) instantly to temppoint
    • Custom script: call RemoveLocation(udg_temppoint)

Just a question about this trigger.
Why do you use the temppoint instead of just saying

Unit - Move(triggering Unit) instantly to center of Recht 001

??
Plz tell me...
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Set Location and remove lcoation each time is stupid
just set locations in map initializing and use em for moving
 
Level 8
Joined
Jun 16, 2008
Messages
333
Ok all you have to do is this, it is in jass code though
JASS:
function Trig_Region_1_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Edem' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Region_1_Actions takes nothing returns nothing
    call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Region_001) )
endfunction

//===========================================================================
function InitTrig_Region_1 takes nothing returns nothing
    set gg_trg_Region_1 = CreateTrigger(  )
    call TriggerRegisterEnterRectSimple( gg_trg_Region_1, gg_rct_Region_000 )
    call TriggerAddCondition( gg_trg_Region_1, Condition( function Trig_Region_1_Conditions ) )
    call TriggerAddAction( gg_trg_Region_1, function Trig_Region_1_Actions )
endfunction
but u have to name ur trigger to Region 1
 
Level 9
Joined
Aug 1, 2008
Messages
453
you guys are making it alot harder than it is.....

  • Events
    • Unit - A unit enters (Your Region)
    • Conditions
    • Actions
      • Wait 0.50 seconds
      • Unit - Move (Triggering unit) instantly to (a different region)
You'll need 4 regions so you wont tele back and fourth nonstop.
 
Level 11
Joined
Dec 31, 2007
Messages
780
guys... moving units from one point to another leaks information (read this plz http://www.hiveworkshop.com/forums/f269/things-leak-35124/ )

and what O2 said is "create a variable with those points at the beginning of the game and use them always, do not delete them". By doing that, it wont leak and you dont have to use 3 lines of code... with only 1 is ok (and the lines that set those points at the beginning)

shendoo2: you are doing it wrong... that leaks... you should read what i linked to

Airhead: your map moves units from one cave to another in an infinit loop... what laggs the heck of a computer and makes it almost impossible to close :/

Oh!... btw squiggy you made a small mistake (srry cor correcting i know that might only be the name of the region)... in gui there are only regions, not rects like in jass, i say this coz the guy might be getting mad trying to find a rect :p

what airhead did is correct, but make it only to go ... not to come back :p
 
Status
Not open for further replies.
Top