Spawn after death

Place for sharing your game modifications for Life is Feudal: Your Own

Tigggy
 
Posts: 26
Joined: 10 Feb 2016, 07:07

Spawn after death

Post by Tigggy » 10 Feb 2016, 08:08

Hey Community,

I saw the trigger to get a new Spawn Location. But this will only help People, who join to a Server the first time.

Is there a way to add a Spawn location after death, aswell? I started to build something like a Graveyard, where People should spawn, when they got killed.

I would be very happy, if someone could help me out with that.

Kindest regards

Tiggy


MacDante
 
Posts: 95
Joined: 12 May 2015, 10:08

Re: Spawn after death

Post by MacDante » 10 Feb 2016, 14:57

simple:

Code: Select all
CREATE TRIGGER `t_set_death_spawn` BEFORE UPDATE ON `character` FOR EACH ROW BEGIN
       set New.RallyObjectID = XXX;
END


why trigger because you can define difirent function and consitions to set spawn point.

like:
Code: Select all
CREATE  TRIGGER `t_set_death_spawn` BEFORE UPDATE ON `character` FOR EACH ROW BEGIN
   SET @spawnPoint = (SELECT BindedObjectID FROM `character` ch WHERE ch.ID = NEW.ID);
       set New.RallyObjectID = @spawnPoint;
END

Where spawn point is this same than Binded Point

Where XXX is a number of UNMOVABLEOBJECT

you can too add in dum pile line:

update `character` set RallyObjectID= XXX;

Where XXX is a number of UNMOVABLEOBJECT

Return to Game mods