Resurrection Help

K

kingsqeerel

Guest
I'm making an RPG and I want to have Ressurection Stones with a Circle of Power in front of them. I want it so whenever a player types "-bind" without quotes, while standing on the Circle of Power, the game will remember which stone they bound at (there will be multiple) and a hero will spawn there when killed with a small loss of EXP. Is there any one who could help me with this? I know it sounds a little demanding, but it would help a lot. Thanks.
 
C

Chele

Guest
As there would be multiple players(that's what I guess) you will need an array of either locations or integer numbers (you could give each stone a particular number). Then you would store each player's current stone in his element of the array.
 
K

kingsqeerel

Guest
Uhhh.... what? Sorry, but I'm not really good at trigger editor, but I know all the basics and stuff. But I really had no idea what you said. Sorry.
 
C

Chele

Guest
For a start, does your map have many players ? (more than one I mean)
 
C

Chele

Guest
Ok. Then, to store the current stone of each player you need either 6 variables or one 6-variable array. Making it with an array would save loads of time and unnecessary tirggers but it's a wee bit harder... Shall I explain how arrays work or are you familiar with'em ?
 
K

kingsqeerel

Guest
I really don't know much about variables, please explain.
 
C

Chele

Guest
This will take some time, but I'll consider it worthwile... A variable is a space on the computer's memory that takes a certain value and can be modified dinamically. In World Editor in particular variables can store every type of data (particular units, unit-types, integer numbers, leaderboards, etc.). They are used basically to store information you need to use in other parts of your trigger or even other triggers. For example, if you are making a trigger that will do many actions to the owner of a particular unit, instead of referencing that player through Owner of(Triggering Unit) every single time you can create a Player variable called Guy and use
Set Guy = Owner of(Triggering Unit)
Form then onwards "Guy" stores that player (it can be re-set to someone else so you may use the same variable in many triggers). The uses of variables are almost endless if used correctly.
Now, as for arrays, these are just that, arrays of a certain number of variables of the same type. Unlike single variables, these are accesed using:
"Name"["Index"] Where "Name" is of course the array name and "Index" is an integer number that represents a particular element of that array. To create an array just tick "Array" when creating a variable and specifiy its size (number of elements).
For your problem in particular I was suggesting making a 6-element array and store the resurrection spot of each of the six players in different elements. Did that help :eek: ? Anyway, feel free to ask.
 
K

kingsqeerel

Guest
Yes, that does help, but how would I make a couple triggers that when you type -bind and so on, with the EXP less and everything? And for each player?
 
C

Chele

Guest
I really can't think of an easy way to do it. From the two ideas I have one requires you to create 6*number of stones triggers and the other one to create 6 triggers and a region array with <number of stones> elements. Choose one :p .
 

Sim

Forum Administrator
Staff member
Reaction score
534
Ok I will do this but lemme time

It might take long !! :p I will edit soon.
 
K

kingsqeerel

Guest
I looked at some different triggers, but none of them seem like they would work for me. Can someone who really knows what they are doing help by describing how to make something like this?
 

Sooda

Diversity enchants
Reaction score
318
Uff... you have to use variables to do it for all players and it is not so hard at all. I can' t give you trigger code because my CD-ROM is broken right now, I will just type you core how to do it.
First of all, in events use player types chat string what is exact mach as "-bind" (without " " ofcourse). You don' t need to add any conditions though I think for now. Then in actions first "If/ Then/ Else" comparison units in region (example first resurection region) matching unit belongs to triggering player equal 1 then set variable (example: resurection region) = region 000 <= First region. If unit dies resurect/ creat that unit with nessesary trigger to region and chooce region variable "resurection region".
Resurection variable is region-variable. Make it array and chooce from index convert player index to player and use triggering player.
 
B

Beelzebubson

Guest
event - player 1 red types -bind as an exact match
player 2.....
conditon -

actions - if then else
if - unit is in region x
then - set RevivePoint[ player number of trigering player] region x
else -
if then else
if - unit is in region y
then - set RevivePoint [ player number of trigering player] region y
else -


something like that
sorry i dont have world editor infront of me
 

Sim

Forum Administrator
Staff member
Reaction score
534
Ok I got it. It all works but I didn't test the part when you aren't in the bind region. Only when you are in. Here are the triggers. I will list the variables below.

Code:
Initialization
    Events
        Map initialization
    Conditions
    Actions
        Set Bind_Area[1] = Bind1 <gen>
        Set Bind_Area[2] = Bind2 <gen>
        Set Bind_Area[3] = Bind3 <gen>
        Set Bind_Area[4] = Bind4 <gen>
        Set Bind_Area[5] = Bind5 <gen>
        Set Bind_Area[6] = Bind6 <gen>

Code:
Enter Bind
    Events
        Unit - A unit enters Bind1 <gen>
        Unit - A unit enters Bind2 <gen>
        Unit - A unit enters Bind3 <gen>
        Unit - A unit enters Bind4 <gen>
        Unit - A unit enters Bind5 <gen>
        Unit - A unit enters Bind6 <gen>
    Conditions
    Actions
        Set Bind_Time[(Player number of (Owner of (Triggering unit)))] = True

Code:
Exit Bind
    Events
        Unit - A unit leaves Bind1 <gen>
        Unit - A unit leaves Bind2 <gen>
        Unit - A unit leaves Bind3 <gen>
        Unit - A unit leaves Bind4 <gen>
        Unit - A unit leaves Bind5 <gen>
        Unit - A unit leaves Bind6 <gen>
    Conditions
    Actions
        Set Bind_Time[(Player number of (Owner of (Triggering unit)))] = False

Code:
Binding
    Events
        Player - Player 1 (Red) types a chat message containing -bind as An exact match
        Player - Player 2 (Blue) types a chat message containing -bind as An exact match
        Player - Player 3 (Teal) types a chat message containing -bind as An exact match
        Player - Player 4 (Purple) types a chat message containing -bind as An exact match
        Player - Player 5 (Yellow) types a chat message containing -bind as An exact match
        Player - Player 6 (Orange) types a chat message containing -bind as An exact match
    Conditions
        Bind_Time[(Player number of (Triggering player))] Equal to True
    Actions
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Set Player_Units[(Integer A)] = (Units in Bind_Area[(Integer A)] owned by (Triggering player))
                Set Number_Units = (Number of units in Player_Units[(Integer A)])
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Number_Units Greater than or equal to 1
                    Then - Actions
                        Set Bind_Owned[(Player number of (Triggering player))] = True
                        Set BindStone_Number[(Player number of (Triggering player))] = (Integer A)
                        Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: (You are now bound to the Bindstone  + (String(BindStone_Number[(Player number of (Triggering player))])))
                    Else - Actions
                        Do nothing

Code:
Dying and Revive
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Bind_Owned[(Player number of (Owner of (Dying unit)))] Equal to True
            Then - Actions
                Hero - Instantly revive (Dying unit) at (Center of Bind_Area[BindStone_Number[(Player number of (Owner of (Dying unit)))]]), Show revival graphics
                Hero - Set (Dying unit) experience to ((Hero experience of (Dying unit)) - (100 x (Hero level of (Dying unit)))), Hide level-up graphics
            Else - Actions
                Game - Display to (Player group((Owner of (Dying unit)))) for 10.00 seconds the text: As you are not boun...

Here are the variables :

- Bind_Area as a Region variable with Array (6)
- Bind_Owned as a Boolean variable with Array (6)
- Bind_Time as a Boolean variable with Array (1)
- BindStone_Number as an Integer variable with Array (6)
- Number_Units as an Integer variable
- Player_Units as a Unit Group variable with Array (6)

If someone here finds a mistake in there please tell me.

I didn't remove leaks, I didn't have enough time.

Good Luck, and I hope it won't bug. Add more things as this trigger is incomplete. It must fit your map. This is just what you need for the complicated things. I hope you know where to add text. Reply here if you really have problems.

EDIT: I think Number_Units should be Array with [(Player number of (Triggering Player))]...

Add it. Change Number_Units to Array with size (1) and set the Index to (Player number of (Triggering Player)).

But since the trigger has no waits in, unless 2 players write "-bind" exactly at the same time it should work. But for safety, add in an array. :p
 
K

kingsqeerel

Guest
Beelzebubson, when you say, "then-set RevivePoint..." how do I do that? Sorry I need so much help.
 
K

kingsqeerel

Guest
It's just REALLY intimidating. All your triggers make me really confused. :eek:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top