• 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.

[General] Maze type teleport tiles

Status
Not open for further replies.
Level 5
Joined
Dec 3, 2012
Messages
117
Been working on this map for a while now and I've come across a slight problem.

11t992c.png


I need the player to get from 1 end of this place to the other and if the unit were to try to walk through the black spaces or touch them or w/e to get teleported back to the start.

Now I've tried making a shitload of regions covering the black areas, but this doesn't really work for the diagonal spaces.

Anyone know how to do this?
 
I'm assuming that's the tile from the outland tileset? You can try this

  • Untitled Trigger 001
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set unit_group = (Units in (Playable map area))
      • Unit Group - Pick every unit in unit_group and do (Actions)
        • Loop - Actions
          • Set loc = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain type at loc) Equal to Outland - Abyss
            • Then - Actions
              • Unit - Kill (Picked unit)
            • Else - Actions
          • Custom script: call RemoveLocation(udg_log)
      • Custom script: call DestroyGroup(udg_unit_group)
You may want to set loc with an offset incase it's to sensitive.
 
Level 5
Joined
Dec 3, 2012
Messages
117
The trigger above will work, but I recommend using a group you never destroy. Add/remove units to/from it yourself.

You mean instead of "Set unit_group = units in region" something along the lines of "When unit enters region, add unit to unit group" and then don't destroy the group, or.. ?


Also, I just noticed, you can't walk over Abyss terrain type, so you won't get teleported >.<
Now I could probably change this somewhere, but I kinda want to do it by trigger, since I'm also using the Abyss tile elsewhere in the map and there you're not supposed to be able to walk over it =/

Any clue how I could change that in a single region by trigger ?
 
Level 5
Joined
Dec 3, 2012
Messages
117
If you make units flying or hovering they should be able to go over abyss.

Any way to do this trigger-wise?
All I could think of was maybe with "Unit - Set custom value" but I really don't know how that command works x.x

If not I could probably make a complicated way around it, but the point is, the hovering should only be in effect in that region, not anywhere else
 
Level 5
Joined
Dec 3, 2012
Messages
117
How would I go about doing this? D:

by using
  • Environment - Set terrain pathing at (Center of (Playable map area)) of type Walkability to On
?
 
Level 5
Joined
Dec 3, 2012
Messages
117
I found a way around it, with help of IcemanBo.

Except, the "tele tile" trigger is not working for some reason.
It is initially off and it gets turned on whenever a hero unit enters the region (the region being the piece of map showed in the first post), but before that happens the hero is replaced by a copy of the hero with movement type "flying" so it can go over the abyss tiles.

Unfortunately the hero does not get teleported when touching abyss...

Here's the involved triggers;

Entering the region
  • Abyss Teletiles Enter
    • Events
      • Unit - A unit enters REGION SwordJob Course <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set TEMPInteger = (Player number of (Owner of (Entering unit)))
      • -------- Creating Dummy fly unit --------
      • -------- Saving the heroes stats in integer variables. --------
      • Set JOBChangeStats[TEMPInteger] = (Strength of HEROPlayerHero[TEMPInteger] (Exclude bonuses))
      • Set JOBChangeStats[(TEMPInteger + 6)] = (Agility of HEROPlayerHero[TEMPInteger] (Exclude bonuses))
      • Set JOBChangeStats[(TEMPInteger + 12)] = (Intelligence of HEROPlayerHero[TEMPInteger] (Exclude bonuses))
      • -------- Saving the heroes unspent attribute points in integer variables. --------
      • Set JOBChangeUnspentAP[TEMPInteger] = (Unspent skill points of HEROPlayerHero[TEMPInteger])
      • -------- Saving the heroes items in item variables. --------
      • Set JOBChangeItems[TEMPInteger] = (Item carried by HEROPlayerHero[TEMPInteger] in slot 1)
      • Set JOBChangeItems[(TEMPInteger + 6)] = (Item carried by HEROPlayerHero[TEMPInteger] in slot 2)
      • Set JOBChangeItems[(TEMPInteger + 12)] = (Item carried by HEROPlayerHero[TEMPInteger] in slot 3)
      • Set JOBChangeItems[(TEMPInteger + 18)] = (Item carried by HEROPlayerHero[TEMPInteger] in slot 4)
      • Set JOBChangeItems[(TEMPInteger + 24)] = (Item carried by HEROPlayerHero[TEMPInteger] in slot 5)
      • Set JOBChangeItems[(TEMPInteger + 30)] = (Item carried by HEROPlayerHero[TEMPInteger] in slot 6)
      • -------- Creating new hero --------
      • Set TEMPPoint = (Position of HEROPlayerHero[TEMPInteger])
      • Unit - Remove HEROPlayerHero[TEMPInteger] from the game
      • Unit - Create 1 Novice (Fly Dummy) for (Player(TEMPInteger)) at TEMPPoint facing Default building facing degrees
      • Set HEROPlayerHero[TEMPInteger] = (Last created unit)
      • Custom script: call RemoveLocation (udg_TEMPPoint)
      • -------- Stats --------
      • Hero - Modify Strength of HEROPlayerHero[TEMPInteger]: Set to JOBChangeStats[TEMPInteger]
      • Hero - Modify Agility of HEROPlayerHero[TEMPInteger]: Set to JOBChangeStats[(TEMPInteger + 6)]
      • Hero - Modify Intelligence of HEROPlayerHero[TEMPInteger]: Set to JOBChangeStats[(TEMPInteger + 12)]
      • -------- Unspent AP --------
      • Hero - Modify unspent skill points of HEROPlayerHero[TEMPInteger]: Set to JOBChangeUnspentAP[TEMPInteger] points
      • -------- Items --------
      • Hero - Create (Item-type of JOBChangeItems[TEMPInteger]) and give it to HEROPlayerHero[TEMPInteger]
      • Hero - Create (Item-type of JOBChangeItems[(TEMPInteger + 6)]) and give it to HEROPlayerHero[TEMPInteger]
      • Hero - Create (Item-type of JOBChangeItems[(TEMPInteger + 12)]) and give it to HEROPlayerHero[TEMPInteger]
      • Hero - Create (Item-type of JOBChangeItems[(TEMPInteger + 18)]) and give it to HEROPlayerHero[TEMPInteger]
      • Hero - Create (Item-type of JOBChangeItems[(TEMPInteger + 24)]) and give it to HEROPlayerHero[TEMPInteger]
      • Hero - Create (Item-type of JOBChangeItems[(TEMPInteger + 30)]) and give it to HEROPlayerHero[TEMPInteger]
      • -------- Adding Spellbook(s) --------
      • Unit - Add Novice Skills (Spellbook) to HEROPlayerHero[TEMPInteger]
      • -------- Adding Skills --------
      • -------- * Interact * --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Interact (Basic Skills) Equal to ABILHeroAbilitiesNovice[TEMPInteger]
        • Then - Actions
          • Unit - Add Basic Skills (Container Interact) to HEROPlayerHero[TEMPInteger]
          • Unit - Set level of ABILHeroAbilitiesNovice[TEMPInteger] for HEROPlayerHero[TEMPInteger] to ABILAbilityLevelsNovice[TEMPInteger]
        • Else - Actions
      • -------- * First Aid * --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • First Aid (Basic Skills) Equal to ABILHeroAbilitiesNovice[(TEMPInteger + 6)]
        • Then - Actions
          • Unit - Add Basic Skills (Container First Aid) to HEROPlayerHero[TEMPInteger]
          • Unit - Set level of ABILHeroAbilitiesNovice[(TEMPInteger + 6)] for HEROPlayerHero[TEMPInteger] to ABILAbilityLevelsNovice[(TEMPInteger + 6)]
        • Else - Actions
      • -------- * Play Dead * --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Play Dead (Basic Skills) Equal to ABILHeroAbilitiesNovice[(TEMPInteger + 12)]
        • Then - Actions
          • Unit - Add Basic Skills (Container Play Dead) to HEROPlayerHero[TEMPInteger]
          • Unit - Set level of ABILHeroAbilitiesNovice[(TEMPInteger + 12)] for HEROPlayerHero[TEMPInteger] to ABILAbilityLevelsNovice[(TEMPInteger + 12)]
        • Else - Actions
      • Selection - Select HEROPlayerHero[TEMPInteger] for (Owner of (Entering unit))
      • -------- Hero creation end --------
      • Trigger - Turn on Abyss Teletiles <gen>
      • Trigger - Turn off (This trigger)
Making abyss tele tiles
  • Abyss Teletiles
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set QUESTJobSwordCourseUGroup = (Units in REGION SwordJob Course <gen>)
      • Unit Group - Pick every unit in QUESTJobSwordCourseUGroup and do (Actions)
        • Loop - Actions
          • Set QUESTJobSwordCourseLoc = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Terrain type at QUESTJobSwordCourseLoc) Equal to Outland - Abyss
            • Then - Actions
              • Set TEMPPoint = (Center of QUEST SwordJob TestIn <gen>)
              • Unit - Move (Picked unit) instantly to TEMPPoint
              • Camera - Pan camera for (Owner of (Picked unit)) to TEMPPoint over 0.50 seconds
              • Custom script: call RemoveLocation(udg_TEMPPoint)
            • Else - Actions
          • Custom script: call RemoveLocation(udg_QUESTJobSwordCourseLoc)
      • Custom script: call DestroyGroup(udg_QUESTJobSwordCourseUGroup)
When you finish a conversation with a guy at the end of the "maze" the abyss tele tiles trigger gets turned off
 
You do
  • Set TEMPPoint = (Position of HEROPlayerHero[TEMPInteger])
but you dont do
  • Set HEROPlayerHero[TEMPInteger] = Triggering Unit
before... so finaly you dont remove unit, and don't create new one. Or do you set this variable maybe in an other trigger?

And better you would use only one UnitGroup and dont destroy them each time:
Just add your heroes to this group via action
  • Unit Group - Add YourUnit to YourUnitGroup
Then you can always 'Pick all units in YourUnitGroup' without creating new one and destroying it afterwards.

Edit:
Also why do you turn your first trigger off after first running? So others wont be able to use this? :s
If a player enters region first time you can set 'Boolean[PlayerNumber] = true' --> and then add in this trigger as condition 'Boolean[PlayerNumber] = false'
 
Level 5
Joined
Dec 3, 2012
Messages
117
You do
  • Set TEMPPoint = (Position of HEROPlayerHero[TEMPInteger])
but you dont do
  • Set HEROPlayerHero[TEMPInteger] = Triggering Unit
before... so finaly you dont remove unit, and don't create new one. Or do you set this variable maybe in an other trigger?

And better you would use only one UnitGroup and dont destroy them each time:
Just add your heroes to this group via action
  • Unit Group - Add YourUnit to YourUnitGroup
Then you can always 'Pick all units in YourUnitGroup' without creating new one and destroying it afterwards.

Edit:
Also why do you turn your first trigger off after first running? So others wont be able to use this? :s
If a player enters region first time you can set 'Boolean[PlayerNumber] = true' --> and then add in this trigger as condition 'Boolean[PlayerNumber] = false'

HEROPlayerHero[] is set at map init.

Updated to add the entering unit when the hero enters the region and the group wont be destroyed anymore.

Also, I turn that trigger off because it kept crashing on me cause I had an infinite loop of new hero creating going on lol. Besides, when you talk to the necesary quest guy and get sent in there, the trigger gets turned on again.

I was thinking, maybe flying units don't trigger the terrain type thing, cause they're flying? :/
 
Level 5
Joined
Dec 3, 2012
Messages
117
Problem solved, created a small region on a piece of abyss tile, saved that tileregion into a terrain variable and instead of checking if the unit is on abyss or not, it now checks if its on that terrain variable or not.
 
Status
Not open for further replies.
Top