Possession EDITED. Very hard to answer...

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
I had a thread like this 2 days agos but i want sumthing diffeent now. How can i make it that when my banshee Hero or Unit uses possession they can then use another ability to leave that body. The thing they leave survives and they are created again. How would this work???
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
You'll need a fair amount of triggers and some global arrays or gamecache.
 

Flare

Stops copies me!
Reaction score
662
hmmm, just hide the triggering unit and store it in a variable (and the prev owner of possessed unit). when the possessed unit casts the exit spell, unhide the possessing unit, change ownership back to prev owner (that you stored in a variable) and move the possessing unit to the possessed units location. you'll need some arrays and such for MUI though

hiding the triggering unit is based on the possession skill NOT destroying the caster (like normal banshee's possession). if it destroys the caster, its impossible i think
 

Lobster

Old Fogey ofthe site
Reaction score
90
easier than that: if the possesed unit is a computer, give the possesed unit the unposses ablity, the computer wont use it with out you telling it to.

Base the unposses ability off a transformation ability, like bearform.
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
that makes no sense i get the vairable one but not the other one

EDIT: And how would i give the possesed unit the ability to unpossess?
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
Why Dosn't this trigger work!!! FRUSTRATING!!!

This is the trigger:

Code:
Possing and unposssossing
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Possession
    Actions
        Unit - Add Unpossess  to (Triggering unit)

Code:
Unpossossing
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Unpossess 
    Actions
        Unit - Create 1 Banshee for Player 1 (Red) at (Position of (Casting unit)) facing Default building facing degrees
        Unit - Kill (Casting unit)

What i want it to do is for the banshee casting possession to enter the unit and the unit to gain the ability unpossess. It can then cast that for no mana so the banshee is created again and the unit that casts unpossess to die. But this trigger dosn't work. I possess but it dosn't create the ability unpossess. +Rep to all those that help! :banghead:
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
the adding ability dosn't work. What should i have it as?

Code:
Unit - Add ability unpossess to triggering unit
?
 

WastedSavior

A day without sunshine is like, well, night.
Reaction score
217
This is the trigger:

Code:
Possing and unposssossing
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Possession
    Actions
[B]        Unit - Add Unpossess  to (Triggering unit)[/B]

That should be (Target unit of ability being cast) not (Triggering Unit)
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
THANKS SOOOO MUCH IT WORKS!!!!

Now for the last question...

How do i get it so once you have unpossessed the unit that was possessed turns back to the preivous owned?
 

darkbeer

Beer is Good!
Reaction score
84
simple:

Code:
Unpossossing
    Events
        Unit - A unit starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Unpossess 
    Actions
        Unit - Create 1 Banshee for (Owner of Unit(TriggeringUnit)) at (Position of (Casting unit)) facing Default building facing degrees
        Unit - Kill (Casting unit)

btw. using starts the effect of an ability is normally better than begins casting an ability.

EDIT: sorry misunderstood^^, use custom value like acehart suggested.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Code:
Possess
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Possession (Channeling)
    Actions
        Unit - Add Unpossess  to (Target unit of ability being cast)
        Unit - Set the custom value of (Target unit of ability being cast) to (Player number of (Owner of (Target unit of ability being cast)))
Code:
Unpossess
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Unpossess 
    Actions
        Set Point = (Position of (Triggering unit))
        Unit - Create 1 Banshee for (Owner of (Triggering unit)) at Point facing Default building facing degrees
        Custom script:   call RemoveLocation( udg_Point )
        Unit - Change ownership of (Triggering unit) to (Player((Custom value of (Triggering unit)))) and Change color
        Unit - Remove Unpossess  from (Triggering unit)
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
sorry i must of done a mis type i wanted the unit that was possed to reutrn back to the original owner not the banshee

srry :rolleyes:
 

eloytoro

New Member
Reaction score
4
If the possessed unit is equal to a hero then you must use a game cache... Trigger comming :D

Trigger 1
Code:
Posses1
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Possess
    Actions
        Unit - Add Unposses to (Target unit of ability being cast)
        Set PlayerOwner = (Owner of (Casting unit))
        Game Cache - Create a game cache from MapName.w3v
        Game Cache - Store (Target unit of ability being cast) as Possesed Unit of Category in (Last created game cache)

Trigger 2
Code:
Posses2
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Animate Dead
    Actions
        Game Cache - Restore Possesed Unit of Category from (Last created game cache) for (Owner of (Casting unit)) at (Position of (Casting unit)) facing 0.00
        Unit - Change ownership of (Casting unit) to PlayerOwner and Change color
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> If the possessed unit is equal to a hero then you must use a game cache

What for?
"Owner of (Casting unit)" is also not the previous owner...


Anyway, just try the trigger from post #14.
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
For post number 14 ive done everything on it expect the line Unit - Change ownership. I just can't the line (Player((Custom value of (Triggering unit))))

could you please tell me what to press to get it
 

duderock101

Check out my 2 Player Co-op RPG!
Reaction score
71
AceHart, your trigger bugs up the game. What happens is this:

Code:
Creating the Ability
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Possession
    Actions
        Unit - Add Unpossess  to (Target unit of ability being cast)
        Unit - Set the custom value of (Target unit of ability being cast) to (Player number of (Owner of (Target unit of ability being cast)))

Unpossossing
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Unpossess 
    Actions
        Set Point = (Position of (Triggering unit))
        Unit - Create 1 Lost Soul for (Owner of (Triggering unit)) at (Position of (Casting unit)) facing Default building facing degrees
        Custom script:   call RemoveLocation ( udg_Point )
        Unit - Change ownership of (Triggering unit) to (Player((Custom value of (Triggering unit)))) and Change color
        Unit - Remove Unpossess  from (Triggering unit)


Bandit Lord 1
    Events
        Time - Every 1.00 seconds of game time
    Conditions
        (Bandit Lord 0030 <gen> is in (Units owned by Player 1 (Red))) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Unit - Pause all units
        Game - Display to (All players) the text: Bandit Lord: This i...
        Unit - Change ownership of Bandit 0031 <gen> to Player 1 (Red) and Change color
        Unit - Change ownership of Bandit 0032 <gen> to Player 1 (Red) and Change color
        Unit - Unpause all units



Unpossessing Bandit Lord 1
    Events
        Unit - Bandit Lord 0030 <gen> Changes owner
    Conditions
    Actions
        Trigger - Turn on Bandit Lord 1 <gen>
        Unit - Change ownership of Bandit 0031 <gen> to Neutral Hostile and Change color
        Unit - Change ownership of Bandit 0032 <gen> to Neutral Hostile and Change color


What happens is the bandit lord is possessed and the 2 other units chnage ownership but an enemy Lost Soul is created and when i kill that another is created and when i kill that the bandit lord and the 2 enemy bandits change back to neutrul hostile... oh and the ability dosn't get created...
 
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

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top