Staredit Network

Staredit Network -> UMS Assistance -> How do LOCATIONS follow the UNIT?!?!
Report, edit, etc...Posted by Devils_Angel on 2005-06-08 at 21:26:31
I want to know how to make a LOCATION follow the UNIT thats move so it can be sent to the BATTLE ARENA in my rpg. say the unit is called/a "marine" and the location is called "trail" how do u make it follow you so when an enemy enters it they both get sent to the BATTLE ARENA? (enemy gos to location "enter battle arena: enemy" and player gos 2 "enter battle arena: player")
Also, how do i make it so when they kill the enemies in the BATTLE ARENA they get sent back to their location (making the location stay where it is when u fight)

plz help me

cry.gif helpsmilie.gif
Report, edit, etc...Posted by LegacyWeapon on 2005-06-08 at 21:36:59
We have tutorials for everything!
http://www.staredit.net/index.php?tutorial=57

Next time use the SEARCH function.
Report, edit, etc...Posted by Mini Moose 2707 on 2005-06-08 at 21:37:32
Use a Move Location to center a location on the Marine.

You can't move a unit back when it dies, but you can have a trigger based on deaths... create one and subtract a death.
Report, edit, etc...Posted by Staredit.Net Essence on 2005-06-08 at 23:20:12
QUOTE
Also, how do i make it so when they kill the enemies in the BATTLE ARENA they get sent back to their location (making the location stay where it is when u fight)


This is how I would do it, although there are probably other/easier ways. Use the trigger from the tutorial LegacyWeapon provided, except only make the location follow the unit if a switch is set. So when the marine goes into battle, clear the switch, so the location stays put, and when he moves back, set the switch again so it follows the marine again.
Report, edit, etc...Posted by Xghozt on 2005-06-09 at 17:49:02
just use this...
Trigger
Players:
¤ What ever player
Conditions:
¤ Always();
Actions:
¤ CenterLocation(*LOCATION1*, on the unit);
¤ Presever trigger


then just make a trigger so that something happends in the lil location
Report, edit, etc...Posted by (U)Bolt_Head on 2005-06-09 at 19:00:02
just use this...
Trigger
Players:
¤ What ever player
Conditions:
¤ Incorrect(information,current);
Actions:
¤ Ignore(Xghost,previous post);
¤ Preserve Trigger();
Report, edit, etc...Posted by KiLLeR2001 on 2005-06-09 at 22:37:40
Here's a few quick examples, nothing too in-depth youll have to adjust the settings according to your map...

QUOTE(Devils_Angel @ Jun 8 2005, 09:26 PM)
I want to know how to make a LOCATION follow the UNIT thats move so it can be sent to the BATTLE ARENA in my rpg. say the unit is called/a "marine" and the location is called "trail" how do u make it follow you so when an enemy enters it they both get sent to the BATTLE ARENA? (enemy gos to location "enter battle arena: enemy" and player gos 2 "enter battle arena: player")

Variables:
InBattle?: 0=No, 1=Yes

If Computer Player brings at least 1 Enemy#1 to 'P1 Location'
Player suffers exactly 0 Deaths of InBattle?
--
Create # of enemy#1 at battle area for computer player
Move human to battle area for current player
Modify deaths for current player set to 1 for InBattle?
Center View at 'battle area'
etc etc etc
Preserve Trigger

Now when you kill the enemies within the Battle Area...

If Computer Player brings exactly 0 Men to 'Battle Area'
Current player suffers exactly 1 death of InBattle?
--
Move hero at Battle area back to 'P1 Location'
Display Text 'Victory!'
Wait(# seconds before player can trigger another battle);
Modify deaths for current player set to 0 for InBattle?
Preserve Trigger


QUOTE(Devils_Angel @ Jun 8 2005, 09:26 PM)
Also, how do i make it so when they kill the enemies in the BATTLE ARENA they get sent back to their location (making the location stay where it is when u fight)

Now for this its rather simple, using in conjunction with the above triggers...

Current player suffers exactly 0 deaths of InBattle?
Current player brings exactly 0 men to Battle Area
--
Center location labeled 'P1 Location' on all Men at Anywhere
Preserve Trigger

Now when you get into a battle, the center location will stop on the world map where it last was before your hero entered the battle area. Because as soon as he enters the battle area it stops centering view on the hero and thus stays in the last spot it was in before you moved over.
Report, edit, etc...Posted by RandomJo on 2005-06-11 at 20:06:00
actually, In Xuru rpg, they don't transfer teh opponent you're facing to the battle arena. They create totally new ones and the orginal monster keeps it's junkyard dog wander.
The text in the <> are the actual trigger names

so it would be like
----------------------------
"player(computer)" brings unit to "(location centered)"on "player1" "unit"<bring>
If switch1 is cleared"
-next-
center view "battle arena"
set properties "disable player1 invincebility"
move players unit to "location Battle Arena"
Create "X" amount of "Computer monster unit" in " location battle arena"<create>
order "computer monster unit" to attack "location centered on hero" <order>
set switch1<set switch>
-preserve trigger-<preserve trigger>
-----------------------------
the second trigger would be
-----------------------------
If Switch 1 is set"
"player" kills "amount" "monster" in "location battle arena"<kill>
-next-
move "player" "unit" from "battle arena" to "HUGE ASS AREA LOCATION" <move>
-Clear switch 1 <set switch>
Preserve trigger
----------------------------

and that should be about it
Next Page (1)