| 11-03-2004, 07:39 PM | #1 |
All right, I bet lots of you know that map battleships? Sorta an aos with ships right? Well I was playing it, and I thought that maybe there could be a way to make the game way cooler. So I'm working on a new version of the map, with one big new addition: So the idea is that in your item slots, you have 6 items normally, with this all 6 items would be your "cannons" (you can upgrade them), but instead of randomly firing like they do in battleships, you would control these. Clicking on one of the items would activate that "cannon" (you can fire in all directions except forward and backwards, the 12 and 56 slots would fire at angles) but, I don't actually know how to do this (I tried a few things that didn't work), so if someone could enlighten me as to how you check for an item being used, and then "attack" someone with a certain weapon. ---edit--- plz help if you can, I'm trying on my own, but it's pretty hard when ur new at triggers and very used to c++ |
| 11-04-2004, 09:04 AM | #2 |
well items can cause problems like this ... actualy i could never find event response "target unit of item being used" and it seems like it doesn't exsist... what you could do is giving the items abilitys without targets and autocmatcly fire the weapons into a certain direction like to the left of the ship so the player cannot target himself but has to rotate his ship right and than klick the item and look how many of his side weapons hit something... and you make all items from the left side of the inventory fire to the left and the other ones to the right ... Code:
events: unit uses an item conditions actions: - if item being manipulated = item carried by hero in slot 1 or ..... in slot 3 or .... in slot 5 than - for each integer a 1 to 4 - created (dummy missle unit) at position triggering unit offset by 20 - (integerA * 10) towards facing angle of triggering unit. - order last created unit to attack move to position of last created unit offset by (weapon range) towards facing angle of triggering unit + 90 else - for each integer a 1 to 4 - created (dummy missle unit) at position triggering unit offset by 20 - (integerA * 10) towards facing angle of triggering unit. - order last created unit to attack move to position of last created unit offset by (weapon range) towards facing angle of triggering unit - 90 add a (weapon range/current movement speed of last created unit) seconds expiration timer to last created unit explode missle events - unit aciquires a target conditions - unit type of triggering unit = dummy missle unit actions: kill triggering unit the trigger will actualy created 4 of these dummy missle units on your ship with 10 distance between each other and make them fly out to the side what should realy look like in the movies... |
| 11-04-2004, 07:21 PM | #3 |
Got this working ---Edit--- Got this working ---Edit--- Got this working ---Edit--- Now I have a bigger problem, I'm using the arrow keys for movement of the boats, but I can't seem to get it to work, I know that the game is recognizing my key presses, but it's not doing anything. Anybody know a good trigger for contrlling movement with the arrow keys? |
