• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Dungeon (RPG)

Status
Not open for further replies.
Level 28
Joined
Jan 26, 2007
Messages
4,789
I have attached 2 systems I have made which handle dungeons and their loot.
(Oh, I already attached 1 of those systems somewhere else. Here's the Direct Download Link).

It probably isn't exactly what you're looking for and both are kinda hard to set up.
The main thing is that they work! :p

This is the easiest way of teleporting a unit:
  • Enter Dungeon 1
    • Events
      • Unit - A unit enters DungeonEntrance1 <gen>
    • Conditions
    • Actions
      • Set TempLoc = (Center of DungeonStart1)
      • Unit - Move (Triggering unit) instantly to TempLoc
      • Custom script: call RemoveLocation( udg_tempLoc )
When the boss of the dungeon dies, you can modify the above trigger to teleport them out of the dungeon (unit dies - unit equals to (boss), move unit).
The custom script is to remove location leaks. Leaks are what cause the game to run slower, you have to remove them.


What do you mean with "item drop" though? Item drops in general? Item drops for dungeons? Player-bound or global?
 

Attachments

  • DungeonLoot (1).w3x
    25.5 KB · Views: 63
Level 12
Joined
Mar 24, 2011
Messages
1,082
Evry dungeon is different.

You need 1 region at the dungeon entrance and 1 region at the dungeon start
Then
  • Dungeon1
    • Events
      • Unit - A unit enters Dungeon1E <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set TempPoint = (Center of Dungeon1S <gen>)
      • Unit Group - Add (Triggering unit) to Dungeon1Challengers
      • Unit - Move (Triggering unit) instantly to TempPoint
      • -------- Specific actions like texts etc. etc. --------
      • Custom script: call RemoveLocation(udg_TempPoint)
For ending youd need 3rd region in which to teleport the heroes when finished
  • Dungeon1End
    • Events
      • Unit - A unit Dies
      • -------- Or whatever event you have for ending the dungeon --------
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Boss
    • Actions
      • Set TempPoint = (Center of Beacon <gen>)
      • Unit Group - Pick every unit in Dungeon1Challengers and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to TempPoint
          • Unit Group - Remove (Picked unit) from Dungeon1Challengers
      • Custom script: call RemoveLocation(udg_TempPoint)
      • -------- Specific actions like texts etc. etc. --------
For the item drop you can just make it like the last trigger but clightly changed:

Dungeon1End2

  • Dungeon1End
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Boss
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • For each (Integer A) from 1 to (Number of units in (Units in Dungeon1Challengers)), do (Actions)
        • Loop - Actions
          • Item - Create Dungeon1Award[Random integer betwen 1 and NoAwardsD1] at TempPoint
          • Item - Set the custom value of (Last created item) to X
      • Game - Display to (All players) the text: Congrats Blah blah


  • GetItem
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Custom value of (Item being manipulated)) Equal to X
  • Actions
    • Set TempPoint = (Center of Beacon <gen>)
    • Unit Group - Pick every unit in Dungeon1Challengers and do (Actions)
      • Loop - Actions
        • Unit - Move (Picked unit) instantly to TempPoint
        • Unit Group - Remove (Picked unit) from Dungeon1Challengers
    • Custom script: call RemoveLocation(udg_TempPoint)
    • -------- Specific actions like texts etc. etc. --------


Note:Youd need to pre-set the award items in the mapinitializing trigger. And NoAwardD1 is the number of items you can get from the boss.
If you use Custom value of item for something set x to something which is practicaly unatainable. Or use
  • ((Triggering unit) is in Dungeon1Challengers) Equal to True
Note2// The above triggers arent polished will leave this to you :)


Tip: If you still have more space in your map (less than 256x256 or if you use JNGP 480x480 ) make the dungeons outside the "non-dungeon" area.

Edit// ap0calypse was faster :)
 
Status
Not open for further replies.
Top