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.

      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