PoLlama Forums  

Go Back   PoLlama Forums > WarCraft > World Editor Help

Reply
 
LinkBack Thread Tools
Old 06-15-2008   #1
 
Join Date: Jan 2007
Posts: 44
crazywolf777 is an unknown quantity at this point
Item Manipulation

There is an item called Soul Gem. It has the ability to trap heroes, but only releases them upon the capturers death. I want to make it able to release the Hero at any time (like clicking on the item in your inventory of something).

Also is there a way to alter it so it can trap any unit, kind of like Devour does, but more like Soul Gem.

Thanks
crazywolf777 is offline   Reply With Quote
Old 06-16-2008   #2
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: Item Manipulation

Hmm that could be kind of hard.

So it should work like Soul Gem and could capture enemy heroes while giving the option to free them any time?
I can't see any possible way right now. I mean how would you alter the code of the soul gem? Here a way I though:

Create your own soul gem dummy item and create a trigger that activates upon player left click the item. Let the player target a hero and hide the hero. Now activate another trigger that again detect when player left clicks on the dummy item. If so unhide the hero.

But it is known that AI have some problems with hidden units.

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!
Mr. Zero is offline   Reply With Quote
Old 06-16-2008   #3
 
Titan's Avatar
 
Join Date: Sep 2006
Location: Seven blocks down from your drug dealer
Posts: 2,672
Titan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond repute
Re: Item Manipulation

Cant you make a dummy hero, make it use the item (when your hero uses it), then opt to kill the dummy hero whne clicked again?

[Only registered and activated users can see links. ]




Titan is offline   Reply With Quote
Old 06-16-2008   #4
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: Item Manipulation

Quote:
Originally Posted by Titan View Post
Cant you make a dummy hero, make it use the item (when your hero uses it), then opt to kill the dummy hero whne clicked again?
Go away!

But yeah what would be a great idea. Do as Titan suggested.

Create a footman and give him locust and invincibility and make him use the soul gem instead of the hero. Kill him when the player press the dummy item.

I need sleep =_=

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!
Mr. Zero is offline   Reply With Quote
Old 06-16-2008   #5
 
Titan's Avatar
 
Join Date: Sep 2006
Location: Seven blocks down from your drug dealer
Posts: 2,672
Titan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond repute
Re: Item Manipulation

I'm never smarter then my triggerwiz!

[Only registered and activated users can see links. ]





Last edited by Mr. Zero; 06-16-2008 at 04:24 PM.
Titan is offline   Reply With Quote
Old 06-16-2008   #6
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: Item Manipulation

My skills rival your own Titan.

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!

Last edited by Titan; 06-16-2008 at 05:15 PM.
Mr. Zero is offline   Reply With Quote
Old 06-16-2008   #7
 
Titan's Avatar
 
Join Date: Sep 2006
Location: Seven blocks down from your drug dealer
Posts: 2,672
Titan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond repute
Re: Item Manipulation

Nice edit Zero, two can play at that game.

[Only registered and activated users can see links. ]




Titan is offline   Reply With Quote
Old 06-21-2008   #8
 
Join Date: Jan 2007
Posts: 44
crazywolf777 is an unknown quantity at this point
Re: Item Manipulation

Yea that all sounds really hard and out of my league...well maybe with some further explanation we'll see.
crazywolf777 is offline   Reply With Quote
Old 06-21-2008   #9
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: Item Manipulation

Well here is how it would work. (Sorry I don't have WE right now)

First create a dummy item (For the real hero) and can only target the things you want, like a low level hero or units, but does no action.
Then create a footman, give him locust, invincibility, remove his model (write none.mdl or something in the custom input) so he can't be seen and remove his attacks. Also give him lot of mana and zero refill time for mana.

Now go into your trigger editor and create a trigger called "My Dummy Soul Gem Pressed" and add the following event:
Code:
Unit - A genetic unit uses item
and as condition:
Code:
Item - The manipulating item is *dummy item*
Here is were the dummy unit comes into play. Then create a the dummy unit and give him the real soul gem.
Also go into the object editor again and create a another dummy item that looks like a "full" soul gem and that can be activated by left clicking on it but does no action.

...

Wait.

This won't work... Hmm... I... I will think about it and see what I can come up with.

Well I hope I gave you something to think about, maybe you can figure it out now. I be back soon as it strikes me.
Mr. Zero is offline   Reply With Quote
Old 06-23-2008   #10
 
Join Date: Jan 2007
Posts: 44
crazywolf777 is an unknown quantity at this point
Re: Item Manipulation

This dummy unit stuff is a little confusing and how he will be operated and all.
Also what does the ability locust do and how have the WC3 creators used it?
crazywolf777 is offline   Reply With Quote
Old 06-23-2008   #11
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: Item Manipulation

The dummy unit won't really be operated, just probably to follow the hero.

Locust is an ability that makes the unit have no pathing and make it unselectable. This is perfect for a dummy unit as dummy units can be called to be placed anywhere on the map, also players won't be able to give orders to the dummy unit and mess up the triggered spell.

Dummy units is often used by spell or triggered events. Sometimes because something needs to happen in the background or cast multiple spell, etc.

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!
Mr. Zero is offline   Reply With Quote
Old 06-24-2008   #12
 
Mr. Zero's Avatar
 
Join Date: Sep 2006
Location: Denmark (GMT+1)
Posts: 2,173
Mr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond reputeMr. Zero has a reputation beyond repute
Re: Item Manipulation

Hmm... dummy unit is ruled out.

A. Won't look right
B. Dummy unit won't do it.

And at the same time the only way to get the hero out of a soul gem is by killing the carrier, which we can't change as it is hard coded.
Got more good ideas Titan, I can't think of anything that can do the same.

Unless we trigger it all ourself which would require some gamecache <.<

Bleh.

[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]
[Only registered and activated users can see links. ]

"In the end there is no greater motivation than revenge"
SO I HERD U LEIK MUDKIPZ?!
Mr. Zero is offline   Reply With Quote
Old 06-24-2008   #13
 
Titan's Avatar
 
Join Date: Sep 2006
Location: Seven blocks down from your drug dealer
Posts: 2,672
Titan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond repute
Re: Item Manipulation

Yeh, you could just do a custom ability.. thats the only way I can think of outside of a dummy unit..

Create *Item1* (Base item for captureing soul)
Create *Item2* (Item for releasing soul)
Create *Ability1* (Base the ability off mana drain, or something that channels and requires target)
Create *Ability2* (Base it off of a instant cast-no-target spell, roar maybe?)

Create new item, then there should be a way to make the item able to cast Ability1.
New trigger that starts when unit start channeling ability, ability equal to ability1, give targeted unit locust ability, maybe create a spot in the corner of the map to move him to? Then remove Item1 from casting unit, give it Item2. New trigger that activates when Ability2 is used, removes locust, moves unit to in front of unit that used the item.

Thats all I can get from the top of my head.. if you dont want to do the locust.. maybe save the statistics of the unit (If they are allowed to change, otherwise just need to save health/mana, unless you want the unit to come out full health/mana, then you dont need to save anything, unless its a hero with items, then prolly need to save that... and remove that unit from the game, then create a new one for the player that lost the unit when ability2 is used, giving it the items of hte old unit.

I just woke up.. sleepy..

[Only registered and activated users can see links. ]




Titan is offline   Reply With Quote
Old 06-26-2008   #14
 
Join Date: Jan 2007
Posts: 44
crazywolf777 is an unknown quantity at this point
Re: Item Manipulation

titan, unfortunately, your idea wont work so well with my map, cause items need to be saved as well as character alterations that may have occured. well, no worries. it's not a big thing, i just thought it would be a cool edition. so we can consider this one closed too then...now for the final part...which you guys know so we'll work that out.
crazywolf777 is offline   Reply With Quote
Old 08-01-2008   #15
 
Join Date: Aug 2008
Posts: 2
Sir.Laggalot is an unknown quantity at this point
Re: Item Manipulation

Ok, I've got this thing to work. It requires a couple triggers, and a Dummy unit, but it works (if roughly).

Code:
Capture
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Cripple
    Actions
        Set Caster = (Triggering unit)
        Set Victim = (Target unit of ability being cast)
        Unit - Create 1 Dummy for Player 1 (Red) at (Position of Caster) facing Default building facing degrees
        Unit - Grant shared vision of Caster to (Owner of Victim)
        Set Dummy = (Last created unit)
        Unit - Order Dummy to Neutral - Devour Victim
        Item - Remove (Item carried by Caster in slot 1)
        Item - Create Trapped Soul at (Position of Caster)
        Hero - Give (Last created item) to Caster
        Wait 2.00 seconds
        Trigger - Turn on Follow <gen>
Code:
Follow
    Events
        Time - Every 0.20 seconds of game time
    Conditions
    Actions
        Set CasterLocation = (Position of Caster)
        Unit - Move Dummy instantly to CasterLocation
        Custom script:   call RemoveLocation(udg_CasterLocation)
Code:
Release
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Thunder Clap
    Actions
        Trigger - Turn off Follow <gen>
        Unit - Kill Dummy
        Unit - Deny shared vision of Caster to (Owner of Victim)
        Item - Remove (Item carried by (Triggering unit) in slot 1)
        Item - Create Soul Gem at (Position of (Triggering unit))
        Hero - Give (Last created item) to (Triggering unit)
The dummy has a modified devour ability that does no damage and will work on heroes of pretty much any level.

There are two items that I used, one has the cripple ability the other has the thunder clap ability. (I used them because they were simple, a single target for choosing the hero and a no target to release. Also the cripple will affect the hero before it's gotten, and the thunder clap will hit them when they come out again (nice debuffs)

I just realized that if I had the dummy at the location of the Victim instead of the caster it would work faster, and look better...

Well anyways, you get the picture, it works, mine doesn't look great, but then again I didn't toss any effects in mine.

Hope this helps.
Sir.Laggalot is offline   Reply With Quote
Old 08-05-2008   #16
 
Titan's Avatar
 
Join Date: Sep 2006
Location: Seven blocks down from your drug dealer
Posts: 2,672
Titan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond repute
Re: Item Manipulation

First trigger --
Unit - Create 1 Dummy unit for Owner of Casting Unit at...
This way it wont just work for player 1..
Item - Remove etc, needs to be made so it checks every item slot.. then removes the item matching w/e the item name is.
Follow trigger --
Completely useless. At the end of the first trigger, remove vision of the hero from the owner (ONLY IF THEY GET VISiON AFTER BEING DEVOURED) and just move the dummy to a spot on the map where it wont be bothered. Then during release, you move the dummy to caster pos. Then again, if you want the victim to have vision.. thats different
Last trigger -- same comment w/ item functions as above

[Only registered and activated users can see links. ]




Titan is offline   Reply With Quote
Old 08-05-2008   #17
 
GhostlySpoon's Avatar
 
Join Date: Jun 2008
Location: Northern Ireland
Posts: 840
GhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really nice
Re: Item Manipulation

Erm, I can't say I have much experience with WE or anything like that, but would it not work to:

Make a custom ability, base it on the Soul Gem ability and make it target whatever you want. Stick it on a custom item with one charge. Then, use a trigger so that when it's used on a unit, save that unit-type AND IT'S OWNER in a variable/array thing or whatever it's called (I can only use the most basic of basic triggers at the moment T.T), and remove it from the map. Then, remove that item from the inventory. Give the user of the item a custom item with one charge with an ability that doesn't really do anything. Then add a trigger that when that item ability is used, it creates a unit of the type saved, for the player saved. Good luck!

I might try it, and upload a map, if I could be bothered.

But I have one question. Why would a player who traps a unit, ever want to let it free again? Unless they create it in the middle of his army and own it within seconds. Doesn't make sense.


The World Ends With You!
GhostlySpoon is offline   Reply With Quote
Old 08-05-2008   #18
 
Join Date: Jan 2007
Posts: 44
crazywolf777 is an unknown quantity at this point
Re: Item Manipulation

Thank you Laggaolot, Titan, and Spoon. However I am really bad at recreating these triggers, and i try to copy and paste them, it wont convert the text into the working trigger. So if you could post a map with the triggers working in it

This ability isn't critical to the map I was working on, now released(I have to post it here on the forum yet), so take your time on it.
crazywolf777 is offline   Reply With Quote
Old 08-06-2008   #19
 
GhostlySpoon's Avatar
 
Join Date: Jun 2008
Location: Northern Ireland
Posts: 840
GhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really nice
Re: Item Manipulation

K. I'm working on it now. First I'll need to learn to use variables and ****, but I'll do it as I try.

Huge chance I'll fail.

Update: Almost there! And I'm getting MUCH better with these triggers, I feel really happy with myself now!

Update: Stuck. I have it like this atm, and need to create a trigger targeting a unit.

Events -

Unit - Unit uses an item

Conditions -

Item-type of (item being manipulated) Equal to Soul Steal Gem (My first custom item)

Actions -

Set StolenSoul = (Unit-type of (targeted unit))
Set StolenSoulOwner = (Owner of (targeted unit))
Unit - Remove (targeted unit) from the game

But there's no unit targeted, and I'm not sure how I would set the unit targeted by the item to be targeted.

Update: Almost got it, still got the problem above. Will finish later, have to go to work now.

Update: Back from work, will get to it again. But I REALLY need help with my above problem!

Also, at the moment, this wouldn't work on heroes, as they need to get stats/items/abilities saved.


The World Ends With You!

Last edited by GhostlySpoon; 08-06-2008 at 03:19 PM.
GhostlySpoon is offline   Reply With Quote
Old 08-06-2008   #20
 
GhostlySpoon's Avatar
 
Join Date: Jun 2008
Location: Northern Ireland
Posts: 840
GhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really nice
Re: Item Manipulation

I'm sorry guys, but I give up until one of you guys give me some help. I can't get my head around this at all.


The World Ends With You!
GhostlySpoon is offline   Reply With Quote
Old 08-08-2008   #21
 
Titan's Avatar
 
Join Date: Sep 2006
Location: Seven blocks down from your drug dealer
Posts: 2,672
Titan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond repute
Re: Item Manipulation

lol @ you BEP, and u can copy/paste code from WE, not type it all out.
Zero has been moving and doesnt have internet up (Or just doesnt want to come on, I completely would understand why).. but ur gonna have to wait for him.

[Only registered and activated users can see links. ]




Titan is offline   Reply With Quote
Old 08-08-2008   #22
 
GhostlySpoon's Avatar
 
Join Date: Jun 2008
Location: Northern Ireland
Posts: 840
GhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really nice
Re: Item Manipulation

It's GUI, and it doesn't seem to copy/paste for me.

I had no idea about Zero. I'll wait.


The World Ends With You!
GhostlySpoon is offline   Reply With Quote
Old 08-12-2008   #23
 
Titan's Avatar
 
Join Date: Sep 2006
Location: Seven blocks down from your drug dealer
Posts: 2,672
Titan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond reputeTitan has a reputation beyond repute
Re: Item Manipulation

That large white area where you put in the GUI from other windows.. at the very top left is a little icon, left click it. Or you can just select everything there by highlighting, and copy/paste.

[Only registered and activated users can see links. ]




Titan is offline   Reply With Quote
Old 08-13-2008   #24
 
GhostlySpoon's Avatar
 
Join Date: Jun 2008
Location: Northern Ireland
Posts: 840
GhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really niceGhostlySpoon is just really nice
Re: Item Manipulation

I'll try it when I have WE open next. I've been a little unmotivated to continue with my Mutating Hero Arena fixing up. Really, I have no reas