How do i make creeps respawn like in open rpgs?

  • Thread starter Thread starter Dabinyol
  • Start date Start date
D

Dabinyol

Guest
plz help me im trying to make an open rpg and need to figure this out
 
1 more thing

Heh i also need help with one more thing how do i import music from video games to my map?Morrowind,Final Fantasy,etc.


Help please..:(
 
Originally posted by Dabinyol
plz help me im trying to make an open rpg and need to figure this out

try:
EVENT: Generic Unit Event - A unit dies

CONDITION:
triggering unit is owned by player neutral hostile

ACTION
wait 60 seconds
Create unit type of triggering unit at position of triggering unit for player neutral hostile



i dont have the editor infron of me so it might be written kinda wrong...
 
You should use the "If/Then/Else (multiple functions)" action.

Code:
Actions:
    Wait 60.00 seconds.
    If
        [Boolean Comparison - Unit if fogged]
        ((dying unit) is fogged to (owner of (killing unit))
    Then
        [Unit - Create unit facing angle]
        Create 1 (unit-type of (dying unit)) at (position of (dying unit)) facing (facing angle of (dying unit)) angle
    Else
       [Trigger - Run trigger (checking conditions)]
       Run (this trigger) (checking conditions
 
try:
EVENT: Generic Unit Event - A unit dies

CONDITION:
triggering unit is owned by player neutral hostile

ACTION
wait 60 seconds
Create unit type of triggering unit at position of triggering unit for player neutral hostile



i dont have the editor infron of me so it might be written kinda wrong...



I don't know if it works but I get the Idea, the thing is tho that when i had that on, the Units respawn moved to where they were dying. So after playing my map for a long time my units my units had moved like far away from where they originally were.


Do any1 know how i can make it so the respawn stays at the same place... Everytime the units dying they respawn at the place they were placed.
 
Make multiple arrays and one integer
Point Array
Unit Array
SysInt
Map Init, pick all units owned by player, add to Unit Array (pick all, set SysInt=SysInt+1 type thing)
Add Point to array as well
Add the event "SPECIFICUNIT dies" to another trigger
In that trig..
Wait X seconds
do a loop
loop Integer A 1 to SysInt
if unit is UnitArray[IntA] then
Create (UnitType of Triggering Unit) at PointArray[IntA] facing Random Degrees
Skip Remaining Actions - For top efficiency!
 
If you have a generic wait, every time you kill a unit it will restart the timer.

You can do it OverWhlem's way but I'm not sure that wait will work. Try it and see but even though it will trigger on specific units it will keep triggering if you keep killing.

I would use a Unit Group but that would respawn all units in the group after a set amount of time, but then you would have to know where you want you creeps to be and use points/regions
 
The Wait will work.
And it will not restart the trigger if a unit dies, it will start a trigger that's exactly the same but running parallel (if not farther behind) then the other trigger.
You can do a Generic Unit Death, or add make a Unit Group, add all the units in the sys to it, then check if the dieing unit is in the group.
 
And it will not restart the trigger if a unit dies, it will start a trigger that's exactly the same but running parallel (if not farther behind) then the other trigger.

I stand corrected. I tested it and you're right
 
After working for a realy long time i got a trigger that works for just this, will post it here :D


First trigger:

Trigger:
  • Revive Creeps 1 by 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Triggering unit)) Equal to Neutral Hostile) and (((Triggering unit) is Summoned) Not equal to True)
    • Actions
      • Wait 20.00 seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at ((Center of (Entire map)) offset by (Creep_X[(Custom value of (Triggering unit))], Creep_Y[(Custom value of (Triggering unit))])) facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))


Secound:

Trigger:
  • Revival System
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) owned by Neutral Hostile) and do (Actions)
        • Loop - Actions
          • Set Integer = (Integer + 1)
          • Unit - Set the custom value of (Picked unit) to Integer
          • Custom script: set udg_Creep_X[udg_Integer] = GetUnitX(GetEnumUnit())
          • Custom script: set udg_Creep_Y[udg_Integer] = GetUnitY(GetEnumUnit())
 
I'm not sure if you guys noticed, but this thread is 7 years old. I doubt the thread owner, or indeed anyone who was around at the time, is still looking for a solution.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Real users can't really disable Javascript anymore these days.
  • Ghan Ghan:
    The internet is broken without it.
  • 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 Discord

Staff online

Members online

Affiliates

Hive Workshop NUON Dome World Editor Tutorials
Back
Top