Jump to content
  • 0

HOW DO I SET THE RESPAWN OF MY CHARACTER?


Marsa Online

Question

3 answers to this question

Recommended Posts

  • 0

You can put a respawn in a city making a common event with a variable.

First, create a Player Variable in boolean with name: Spawn city 1. 
Second, create an Event and put it to give the Variable.
Example: Statue of Life.
When a player inteact with this event it will give the variable.
Third, Create a Common event and put it "On Respawn", put the same name: Spawn City 1.
At Spawn/Execution Conditions put: 
Condition Type: Variable is...
Player Variable: Spawn City 1
Boolean Variable: TRUE
And at Commands, put:
Warp.
Chose  where you want to respawn when die.
Aaaaand it's done.

You can create many spawn points at this way.
But whenever you need do change the spawn potion you need to up to put the old variable false.
 

Link to comment
Share on other sites

  • 0

Alright so I needed to do spawn gates myself and here's the simplest way to do it.
While Austermann's way will work you don't want to be using Boolean's as each time you set a new spawn you'd have to set all the others to false. It's very messy lol. String is much easier.

So here's what you need to do;

1) Create a player variable.
Name: "Spawn Point" - or anything you like.
Type: 'String' - we want to store text in there.
Text Id: "plyrSP" - anything you want (optional)

2) Create an Event on the map / tile you want players to interact with to set spawn point.
(Map Layers, Events, then double click a tile to place event there.)
You will also want to mark the spot somehow with some 'Tiles' on the mapping.


In the map tile event do the following;

Insert - 'Show Options'
Text: "Would you like to set your spawn point here for if you die?" - anything you want
Option 1: "Yes, Set spawn here"
> When Yes: (Insert 'Set Variable')
Select Variable: 'Player Variable'
Set to the variable you created; "Spawn Point".
Set, Value: "Town Name A" <- Type your (town / location name)* here.
(Insert 'Show Text') 
Text: "Your spawn point has been successfully set to \pv{plyrSP}"

> When No:
Option 2: "No Thanks"
Show Text: "Your spawn point has not been changed."

-------------------------------

Now do the same for every spawn point you want to set. Changing the (town / location name)* each time.

Once you've done that all you need to do now is your onRespawn event:

To do that simply;
Common Event Editor:
Create a new event.

Call it "Respawn" or anything you want.
Trigger: "On Respawn)

For each 'Spawn Point' you will need to do the following here;

@>Conditional Branch: [Player Variable: Spawn Point is Equal to "Town Name 1"]
     @>Warp Player [Map: 'map name' X: - Y: - Dir: -
(replace above values such as map name, x and y location and even direction)

-------------------------------
 That's it pretty much unless you want to also add an optional command to check your current spawn point.
If so make a new Common Event; (Call it something like 'Spawn Check')
Trigger: (On Command)
/spawncheck <-- command you want.
Add Chatbox Text: "Your spawn point is currently set to \pv{plyrSP}"

Hope this helps, any problems just holla :)


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...