• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] How to "Eat" Units

Status
Not open for further replies.
Level 4
Joined
May 4, 2007
Messages
81
Could you just give your "Pac-Man" unit the Devour ability, set it to a very low cool down and then make the "Dots" units edible? A solution similar to this would not require any triggers.

He could be asking for a Pac-Man devour like animation...am i right?
Also he could want the *ping* sound which would require a trigger, like when pacman eats a dot.
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
you would have to have a looping trigger so that the pack man casts the devour spell automatically to devour the dot directly infront of it when it is issued a command to move to a place. i personally would use devour and a trigger that automatically keeps re-running the devour spell, which would have a small cooldown, to target any units (dots) within a very small range, so they are devoured when the packman goes over it.
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
  • Oh Noes
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(devour))
      • (Unit-type of (Targeted unit)) Equal to Dot
    • Actions
      • Sound - Play YourSound
the string of the ability (devour here) is dependant on whatever you name it as in the ability editor. This would only work if you do what i say above (with the small aquisition range) and if the cool down is small. These facts should givens considering this a pac man map or something so you should have no troubles, but if they arent the sound will be relaly weird lol.
 
Level 4
Joined
May 4, 2007
Messages
81
Well it would be hard to get a allready warcraft made sound that sounded like you want it. I would reccomend going to a website and downloading the pac man sounds if you can find them. Then import the sound....can you import sound? i think you can, but anyway import it into the game. Or another good option in self recording a sound like get your microphone and put it in front of the speaker while playing pacman online or somthing.

EDIT:Off-Topic:
I need Modeling Tools Plz Helps Me!
Regrading your signature i belive we have a section on modeling tools: http://www.hiveworkshop.com/forums/showthread.php?t=7414 thats it.


EDIT:Off-Topic:
Trigger: Oh Noes

Events

Unit - A unit Is issued an order targeting an object

Conditions

(Issued order) Equal to (Order(devour))
(Unit-type of (Targeted unit)) Equal to Dot

Actions

Sound - Play YourSound
How do you make a picture of the trigger is it a system in the fourm or is it a SS?
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
can you import sound?

yes you can


another good option in self recording a sound like get your microphone and put it in front of the speaker while playing pacman online

lol this is a fantasic option if you want to have a really large .wav with awful quality sounds in it :p if you want to record it directly off you pc set your hardware speaker output (the name of your soundcard) as a hardware microphone input under stereo mix mode in the microphone section of the advanced properties menu in the volume options.

How do you make a picture of the trigger is it a system in the fourm or is it a SS?

no its like generated by the
  • tags, i think you can just highlight the trigger text, copy it and then repaste it in the trigger tags. test it and find out.
 
Level 6
Joined
Mar 2, 2006
Messages
306
the idea of casting devour 200 times per level is repulsing to most people (starting with me). just give your pacman permanent immolation, and assign some in-game teleporting sound (short woosh) as dots' dying sound... (see that ghosts have spell immunity or heavy regeneration so pacman doesn't burn them too). simpler?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Simply use the unit enters X distance of unit event and make the dots units. When a dot triggers the event it plays the animation.

Also, this is the triggering fourms, for a model request use the request section or if you need help making one your self ask in the model sections (or animation if that is your problem).
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
this is how i would do it, give the dots an attack that does no damage, has no cooldown, has no animation, no soundset, an attack that is basically invisible. then make its attacking range about the same as a footmans, maybe a little smaller:

  • Oh Noes
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Dot
      • (Attacked unit) Equal to Pacman
      • (Distance between (Position of (Attacking unit)) and (Position of (Attacked unit))) Less than or equal to 1.00
    • Actions
      • Unit - Remove (Attacking unit) from the game
      • Sound - Play YourSound
i mean, thats really easy, no spells required and also you can tag on any points or whatever needed, oviously your ghosts will need to be allies with your dots tho :p
 
make a devour abil, give the animation names like "spell cast" which will look like a eat animation then

  • PacMan
  • Events
    • Map initialization
  • Conditions
  • Actions
    • Set Pacman(unit) = (unit on the map to be pacman)
this makes ur pacman to be considered pacman
  • This can be eaten
  • Events
    • Time - Every 0.01 seconds of game time
  • Conditions
  • Actions
    • Unit Group - Pick every unit in (Units within 200.00 of (Position of Pacman) and do (Actions)
      • Loop - Actions
        • Set eatthis = (Picked unit)
this means that every unit within 200 range of pacman will become eatthis
  • Eatthis
  • Events
    • Time - Every 0.02 seconds of game time
  • Conditions
  • Actions
    • Unit - Order Pacman to Neutral - Devour eatthis
This means that the unit called eatthis will be eaten.

Make sure ur Pacman has the ability Devour on him.
for the sound just put
  • Sound effect
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Devour
  • Actions
    • Sound - Play (Your sound) at 100% volume, attached to Pacman
Hope that helps
 
Level 4
Joined
May 4, 2007
Messages
81
this is how i would do it, give the dots an attack that does no damage, has no cooldown, has no animation, no soundset, an attack that is basically invisible. then make its attacking range about the same as a footmans, maybe a little smaller:

  • Oh Noes
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to [B]Dot[/B]
      • (Attacked unit) Equal to [B]Pacman[/B]
      • (Distance between (Position of (Attacking unit)) and (Position of (Attacked unit))) Less than or equal to 1.00
    • Actions
      • Unit - Remove (Attacking unit) from the game
      • Sound - Play YourSound
i mean, thats really easy, no spells required and also you can tag on any points or whatever needed, oviously your ghosts will need to be allies with your dots tho :p

Umm i think you got your trigger wrong.....ill highlite the stuff i think is wrong.

They should be switched around.
Like
(Unit-type of (Attacking unit)) Equal to PacMan
(Attacked unit) Equal to Dot


Correct me if im wrong.
 
Umm i think you got your trigger wrong.....ill highlite the stuff i think is wrong.

They should be switched around.
Like
(Unit-type of (Attacking unit)) Equal to PacMan
(Attacked unit) Equal to Dot


Correct me if im wrong.

no hes saying that, when u go over the dot, the dot attacks pacman automatically cause its an enemy then gets removed if it does.
 
Level 21
Joined
Jan 5, 2005
Messages
3,515
lol its like reverse phsycology in trigger terms :p but you could easy reverse it by doing packman attacking, and attacked unit to be removed...i dont know why i chose to do it this way, i might have had a valid reason at the time i wrote it :p

in reply to Just_Spectating:

yeh that would work, as i have mentioned you can get this done loads of different ways. my only concern of your trigger is that using two periodic time events of less than second...would that lag? i dont know i have never had such short periodic events.

if the person who is making the pacman map is using a traditional "wakka-wakka" pacman where its always doing the mouth eating animation, i dont think devour would be neccessary, you could use immobilisationsses if u wanted, or any number of other spells or methods. otherwise use devour.
 
Level 5
Joined
May 27, 2007
Messages
132
I don't know how to do that cool trigger effect:

Set up each dot.

Set up your board.

Make PacMan a Hero unit if you haven't already, and make the ghosts just normal units.

1st trigger:

Event: Unit comes within 50 of unit Pacdot
Conditions: Unit equal to Hero
Actions: Play Sound "Paku"
Kill triggering pacdot
Add however many points to the leaderboard

you may need a second trigger to kill the pacdot. In that case forget the second event in the last trigger and make

2nd trigger:

Event: Unit comes within 50 of unit Pacman
Conditions: none
Events: Kill triggering Unit

Notice that one involves coming within 50 of Pacman and the other PacDots. This is because the triggering unit is different if they switch spots and it's simple to just have a trigger of "Kill Triggering unit" and it's easy enough to do these 2 triggers separate, much easier than to do them both in one trigger.
 
Level 3
Joined
May 28, 2007
Messages
57
Codexx's second trigger is an easy way to create the eating dot's thing for pacman so it would be a good choice and Just_Spectaing your timers would lag if it's every 0.01 and 0.02 seconds just set them to about 0.20 seconds and the it shouldent lag :)
 
Level 3
Joined
Jun 14, 2007
Messages
33
Couldn't you do something like...

Event--
A Unit is Attacked
Condition--
Unit-type of attacked equal to Dot
Attacking Unit Equal to Pacman
(Forget the Distance, or do it like GST's)
Action--
Remove Dot from game
Sound-Play Munch (or w/e sounds good)


And couldn't you also have it to where a Dot just gets Touched?
And so on for the Higher Levels....
 
Last edited:
Level 5
Joined
May 27, 2007
Messages
132
But that still requires the player to attack. It's much easier to have it work so when Pacman gets close enough to the point it looks like he touches, a trigger runs that destroys the dot and adds points.
 
Level 3
Joined
May 29, 2007
Messages
50
You know, the other guy was right, you should just make an invisible inmolation spell.

Activate the spell at the beggining of the map for your pacman unit, make the spell cost no mana and have no visual effect and make the hitpoints of the "dots" units go down to 1.

Simple. And wouldn't devour make the unit stop in order to perform the "spell"? With inmolation, however, just walk over them like nothing. :p
 
Level 5
Joined
May 27, 2007
Messages
132
Ok, if he does that you still need a trigger:

Action: A unit dies
Condition: Unit is of type (Pacdot)
Event: destroy unit
Event: Add 200 Points to (Leaderboard A)

Pacdots wouldn't leave corpses. They'd disappear. So unless the death animation is something like the pacdot shrinking and imploding upon itself, then it still needs to be destroyed, and the points properly added.
 
Level 3
Joined
Jun 14, 2007
Messages
33
Just have something like... umm, a range in distance... umm, like this...
Action--
Unit- Damage Traget blah blah blah
And then Have a Range set, but make the spell you want to use make it work for that trigger, understand?
 
Level 5
Joined
May 27, 2007
Messages
132
also the sounds to be added, with an attacking pacman or dot or a range event it does it all in one trigger. the fact of this is, there are probably 15-20 ways of doing this correctly and its personal preference which one is used.

Still it can be done in one trigger probably, and that would be better than a complicated system of multiple triggers and variables, which also risks a memory leak.
 
Level 3
Joined
Jun 14, 2007
Messages
33
Well, you could make it like a maze.. (didn't read anything, so don't yell at me if I copied...)
  • Event
  • Unit - A unit comes within 10.00 of Pacman0000
  • Condition
  • Owner of Pacman Not equal to Player 1
  • Action
  • Unit - Kill (Triggering Unit)
I'm not sure if the condition is correct, so you may have to move a few things around a bit, sorry, but this is the best I can do.
 
Status
Not open for further replies.
Top