Changing PlayerGroup?

Elmekior

New Member
Reaction score
1
I made this trigger for changing from a player group to another. But it does'nt completly remove the player from previous player group. Please help me solve the problem.

Freelancer
Events
Dialog - A dialog button is clicked for AllianceChange
Conditions
(Clicked dialog button) Equal to Freelancer
Actions
Player Group - Remove (Triggering player) from Anarchs
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Camarilla
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Garou
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Hunters
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Independant
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Sabbat
Wait 0.33 seconds
Player Group - Add (Triggering player) to Autarkis
 
Reaction score
456
Why do you need those waits between the functions? Try it without them, cause the trigger looks fine with me..
 

waaaks!

Zinctified
Reaction score
256
Code:
Freelancer
Events
Dialog - A dialog button is clicked for AllianceChange
Conditions
(Clicked dialog button) Equal to Freelancer
Actions
Player Group - Remove (Triggering player) from Anarchs
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Camarilla
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Garou
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Hunters
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Independant
Wait 0.33 seconds
Player Group - Remove (Triggering player) from Sabbat
Wait 0.33 seconds
Player Group - Add (Triggering player) to Autarkis

does Sabbat Autarkis...etc. are players?
if yes why did u used Triggering Player?
can u add a player to a player?
 

Elmekior

New Member
Reaction score
1
Those wait are just something I tried, with our without them does'nt change a thing.

All these are preestablished teams(group of players). So I need not destroy those for the sake of other players. I just need to remove the triggering player from any group he is already in and add him to autarkis(freelancer group)
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
yes u can and also remove them.
i dunno why u use this waits between them i don't see what's the point i suggest to remove them.

also can u tell me in what way did u check they haven't been removed?
 

Elmekior

New Member
Reaction score
1
Yes of course. I removed the wait time, It is just something I tried to fix the problem, but it did not do any good.

I have a rebirth trigger, where if the hero has an ankh of reincarnation he resurrects in is base. And what happened is that he was first move to his old base (old team) then to his new one. Weird. So it is how a came to the conclusion it was'nt completly removed. Here is part of the rebirth trigger I am talking about.

Rebirth
Events
Unit - A unit Uses an item
Conditions
(Item-type of (Item being manipulated)) Equal to Ankh of Reincarnation
Actions

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Hero manipulating item)) is in Autarkis) Equal to True
Then - Actions
Wait 2.00 seconds
Set L37 = (Random point in Region 137 <gen>)
Unit - Move (Hero manipulating item) instantly to L37
Camera - Apply (Current camera) for (Owner of (Hero manipulating item)) over 0.00 seconds
Set L81 = (Position of (Hero manipulating item))
Camera - Pan camera for (Owner of (Hero manipulating item)) to L81 with height 400.00 above the terrain over 0.00 seconds
Game - Display to (All players controlled by a ((Owner of (Hero manipulating item)) controller) player) the text: Your Hero will revi...
Custom script: call RemoveLocation(udg_L37)
Custom script: call RemoveLocation(udg_L81)
Else - Actions
Do nothing

(BTW sorry I still did'nt figure how you attach trigger)
 

ManyTimes

I'm so lonesome I could cry...
Reaction score
293
And what happened is that he was first move to his old base (old team) then to his new one. Weird.

Well, in that trigger, you do only revive him in region 037... So to me, it looks like he will be moved there? What is the other region he is moved to first? Show us that trigger too? Oh.. btw, why dont you just create 1 trigger, that makes all heroes upon death, revive at THAT region.. you sort each hero out.
Like this:
Code:
SortOut
    Events
        Unit - A unit enters SortOutHeroes <gen>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        If (((Owner of (Triggering unit)) is in Sabbat) Equal to True) then do (Unit - Move (Triggering unit) instantly to (Center of SabbatSpawn <gen>)) else do (Do nothing)

And just add for the rest of the playergroups you got. Then when it dies/if it got ankh or not..Revive him in that region "SortOutHeroes"... I really dont understand your problem buut... hmm..hope this solves! :cool:
Cheerio
 

Elmekior

New Member
Reaction score
1
OK I will explain exactly how I made my map.

It is a vampire-werwolf-hunter map. Go download here, it might help you understand (btw I am working on a new version, I found a few bugs in this one)
http://world-editor-tutorials.thehelper.net/maps.php?view=458

So in the beginning depending on the faction you choose, your hero is moved to a specific base with a key for door. Upon death he is reborn in this base (I only put part the rebirth trigger in previous post). Upon choose his faction the player is put in a playergroup variable. Ex. Werewolfs go in Garou variable then alliances are made for this group.

Now, what I want to do is to be able to change again faction while plaing in-game so that let's say you want to become a werewolf friendly to vampires (wich is philosophicaly quite improbable) you can.

But the add player to player group (variable) works, thus also gaining all alliance properties of that group, but seemingly the remove from player group is not working.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
here's a better way to check:
Code:
Event
   Every 2.00 Seconds
Condition
Action
   If \Then \Else
       If - Condition 
           Anarchs Contains Player 1 (Red) Equal to True
       Then - Actions
           Display Text to All Players - "Anarchs"
      If \Then \Else
       If - Condition 
           Camarilla Contains Player 1 (Red) Equal to True
       Then - Actions
           Display Text to All Players - "Camarilla"
and so on......
so if it realy doesn't remove u would be seeing the name of the clan he is in displayed throught text.
Game - Display to (All players controlled by a ((Owner of (Hero manipulating item)) controller) player) the text: Your Hero will revi...
it leaks a player group and u can simply display it to the Owner of the hero without using this player group condition just look better.

(BTW sorry I still did'nt figure how you attach trigger)
to use code tags u simply pick the # or simply write
Code:
*Trigger here*[code] of course don't forget to add the "/" at the second one.
 

Elmekior

New Member
Reaction score
1
IF I clear the player group as a solution to completly remove previous group, will it definitly also clear other members ot this playergroup? (view previous post to understant what I am saying)
 

Tinki3

Special Member
Reaction score
418
>(BTW sorry I still did'nt figure how you attach trigger)

Right click on your trigger's title (the one above the Events, conds, and acts), and from there you can copy the whole thing.

I also noticed that you didn't wrap your triggers in the CODE type. Just highlight the desired text, and click the little '#' button, at the top of the menu.
 

Elmekior

New Member
Reaction score
1
Ok thanks Tinki3. I still need help solving that bug though.

Can the solution be custom scripting. If so can someone tell me what to do?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
did u check if it was removed from the groups like i told u?

also that's not a bug u must have done something wrong.......
try showing us also the dialog trigger which u created i wanna see it....
 

Elmekior

New Member
Reaction score
1
Oh I read to fast, I tought you just did'nt get my problem. I will be sure to check that. And post all concerned triggers. Hey, hey.

Tested and it works! Indeed I had forgotten to change 2 conditions in the rebirth Trigger. Thanks Doom-Angel your checking trigger was quite useful.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top