HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do you make items shoot things?

12-08-2004, 05:43 PM#1
Kalvorod
Like in Battleships, when you have an Item, and a unit comes within range, it shoots a missle. I know how to do the Event, and Condition, but what about the Action? How do I do this?
12-08-2004, 06:02 PM#2
AFB-DieHard
You could use custom units which have no model so they are invisible. You may want to give it the locust ability so it can't be selected(but I don't know if units without models can be selected). Then you could create them and add it to a unit group. Then make another trigger which moves every unit in this unit group immediately to the position of your main unit(hero, ship, whatever). Set the range and damage etc. in the object editor. If the item is dropped just remove the unit from the game and then from the unit group(or you could also use a unit array of size six and save the unit in it depending on which inventory slot the item is in)
12-08-2004, 06:33 PM#3
Anitarf
I am working on exactly this kind of thing (a Battleships-type map) at the moment.

One method, like DieHard mentioned, is with dummy units that work as your turrets. You constantly move them along with the ships they are assigned to. This method isn't so easy, as it requires intermediate triggering skill.

There is a much simpler method, though. You can use the ability phoenix fire. With slight modifications (only one target attackable at a time, etc), it works as a turret; in fact, this is the way Sked did it in his Battleships map. Just add the phoenix-fire-ability to a unit whenever the unit acquires the item, and remove the ability when the unit looses the item.

The only problem with the easy method is that the attacks aren't actual attacks, but a spell effect. Because of this, you can't add special abilities like bash or poison to these attacks.
12-10-2004, 12:44 AM#4
Kalvorod
Ok, so how do I do it? Those are two good ideas.

Specifically what I want is a unit I think, for some, but maybe a spell for others. I want each thing to have a limited ammount, and not actually be an item, but a Hero.

The reasoning for this is the Using a Keyboard message. By using a hero I can press F1 to use the weapon, and F2 to use a different weapon(Selects heros, then use a "Player selects a unit" Event). The reason I want it to be limited is because I want to buy ammo for each weapon, and to be able to run out.

Some weapons like the Machine gun will just go straight(unit) while others will home in (Spell?). Unfortunatly I don't know how to use Pheonix Fire like you said, could you explain it more?
12-10-2004, 12:51 AM#5
Taur
Quote:
Originally Posted by Kalvorod
Ok, so how do I do it? Those are two good ideas.

Specifically what I want is a unit I think, for some, but maybe a spell for others. I want each thing to have a limited ammount, and not actually be an item, but a Hero.

The reasoning for this is the Using a Keyboard message. By using a hero I can press F1 to use the weapon, and F2 to use a different weapon(Selects heros, then use a "Player selects a unit" Event). The reason I want it to be limited is because I want to buy ammo for each weapon, and to be able to run out.

Some weapons like the Machine gun will just go straight(unit) while others will home in (Spell?). Unfortunatly I don't know how to use Pheonix Fire like you said, could you explain it more?
umm set maximum targets 10 one, set the cooldown, to the cooldown of a normal attack, set the missile model to what you want se the speed check missile homing and yeah...
12-10-2004, 01:41 PM#6
Kalvorod
Quote:
Originally Posted by darkhorde
umm set maximum targets 10 one, set the cooldown, to the cooldown of a normal attack, set the missile model to what you want se the speed check missile homing and yeah...

When you say "set maximum targets 10 one" what does that mean?
12-10-2004, 04:02 PM#7
Anitarf
It means "set maximum ammount of targets to 1". If you want a spread cannon, you can also set it to more than 1.