HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

more RPG trouble

01-29-2004, 03:03 AM#1
GosuSheep
in an old starcraft RPG called Padoraths return, there was a nice exp spawn where if a hero was in a region then 6 units would spawn and once theyre dead, more would spawn

at first it seemed to be very easy to me, but as i tried to put the trigger in, it seemed very complicated.

example:
Event -
Every 1:00 seconds
Conditions -
Actions -
Unit group - Pick all units in (SOLDIERSPAWN) and If (picked unit) equal to hero and (picked) unit not equal to footman then create 6 SOLDIERS for player 10 at SOLDIERSPAWN facing blah blah blah
else do nothing

quite long if/then/else statement... ive though of ways to even use 3 triggers and they all turn eachother on/off to work... its still surprisingly not working...

the biggest problem is that i cant have the game CHECK if there are any SOLDIERS in the region (and im usually good with this stuff...)

Any suggestions?
01-29-2004, 03:19 AM#2
Narwanza
Add the soldiers to a unit group, and every time they die, remove them from the unit group. When the unit group's count ='s 0 then turn on the spawn trigger.
01-29-2004, 03:36 AM#3
311
e: unit dies
c: unit is in region soldiers
c: units in region = to soldiers = to 0
c: unit = to soldiers
a: wait 10 seconds create 6 soldier for player 10
01-29-2004, 04:42 AM#4
GosuSheep
thanks for the suggestions

the problem with the "unit dies" event is that, im trying to make it so, even if they dont die and a hero is in the SOLDIERSPAWN region, that more SOLDIERS are created

so if the hero runs away and the SOLDIERS follow the hero, another hero can go to the SOLDIERSPAWN region and get more SOLDIERS spawned...

seems sooooo easy, but i cant find out how to do it = \
01-29-2004, 05:08 AM#5
311
so do you only want 6 there at a time though? like if they run then create 6more.

e: unit enters region
c: region = to soldiers
c: units in region soldiers of unit type soldiers = to less then 6
a: create 1 soldier for player 10

with the unit enters region event I dont think it will keep firing the trigger if your in the region so try this instead


E: every 1second

A: if #of units of unit type soldiers in region soldiers is equal to 2 then do create 4soldiers for player 10

A:if #of units of unit type soldiers in region soldiers is equal to 3 then do create 3soldiers for player 10


A:if #of units of unit type soldiers in region soldiers is equal to 4 then do create 2soldiers for player 10

Theres probably an easier way to make it 6 lol but im not the best trigger so thats my way ^
01-29-2004, 05:09 AM#6
GosuSheep
aww crap, good idea
thanks, ill try that
01-29-2004, 08:02 PM#7
Shimrra
Try this:

Event: Unit enters region Soldiers

Condition: ((Triggering Unit) is a Hero) Equal to True

Action: If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If: (Number of units in (Units in Soldiers <gen> owned by player 10 (Light Blue))) Less then 6

Then:
- Unit Group - Pick every unit in (Units in Soldiers <gen> owned by player 10 (Light Blue)) and do (Unit - Order (Picked Unit) to stop)
- Unit - Create (6 - (Number of Units in (Units in Soldiers <gen> owned by player 10 (Light Blue)))) Footman for Player 10 (Light Blue) at (Random point in Soldiers <gen>) facing 0.00 degrees
- Unit Group - Order Units in (Units in Soldiers <gen> owned by player 10 (Light Blue)) to Attack (Triggering Unit)

Else: Do nothing.

I strongly suggest entering a wait, otherwise if several Heroes enter in rapid succession, their will be A LOT of footmen... (Or maybe it was because I used 5 Heroes to test it...)
01-29-2004, 11:47 PM#8
linkmaster23
Who said alot of footmen were a BAD thing... Muhhahahahha. *runs away*
01-30-2004, 01:51 AM#9
GosuSheep
thanks for the help guys

one question:

what comparison is the
---If: (Number of units in (region))--- thing under?

nevermind!!! i found it..

thanks for all the help guys^^
01-30-2004, 07:58 PM#10
Shimrra
It is an integer comparison.