Staredit Network

Staredit Network -> UMS Assistance -> Darkswarm firing: Ammo & weapon change
Report, edit, etc...Posted by [CreaMPuFF] on 2006-11-06 at 19:18:49
Can somone explain to me or give me some basic guidelines atleast on how to add an ammo system into my map aswell as weapon changing. I'm using a darkswarm firing system.
Report, edit, etc...Posted by fritfrat(U) on 2006-11-06 at 21:39:30
However suits your fancy, basically. You can look at Tux's maps to see how he did it if you want, but it's really up to you how you end up feeling like making your system work.
Report, edit, etc...Posted by [CreaMPuFF] on 2006-11-06 at 22:17:54
QUOTE(fritfrat(U) @ Nov 7 2006, 02:39 AM)
However suits your fancy, basically. You can look at Tux's maps to see how he did it if you want, but it's really up to you how you end up feeling like making your system work.
[right][snapback]584824[/snapback][/right]


What map of his should I look at?
Report, edit, etc...Posted by SomeIdiotNerd on 2006-11-06 at 22:58:19
dark swarm firing systems are quite complicated if you don't have any idea of how they work. I'll try to make a short explanation with some trigger help. (i remind you that this will not work by putting it in an editor, i simplified it)

Trigger
Description:
Turning on the gun or attack
Players:
¤ P1
Conditions:
¤ Bring(current player, at least, 1, Pistol, to location "Chosen Weapon")
Actions:
¤ SetDeaths(SetTo,1,for Independant Starport)
¤ PreserveTrigger

This is setting the gun in a simplified way, there are many ways that a gun may be set


Trigger
Description:
The In Range Location (Not Required)
Players:
¤ P1
Conditions:
¤ Always
Actions:
¤ MoveLocation("In Range", on Defiler, at "Anywhere")
¤ Preserve Trigger

This trigger simply attaches an in range location on your defiler, but this is not required.


Trigger
Description:
Firing the Weapon, Location Required
Players:
¤ P1
Conditions:
¤ Bring(All Players, Exactly, 1, Dark Swarm, Anywhere);
¤ Deaths(P1, Exactly, 1, Independent Starport);
¤ Bring(P1, Exactly, 1, Defiler, in range);
Actions:
¤ PreserveTrigger();
¤ MoveLocation(Attack Unit, Dark Swarm, All Players, Anywhere);
¤ RemoveUnitAtLocation(1, Dark Swarm, All Players, Attack Unit);
¤ Put Anything you want to happen here
¤ Example: CreateUnit(1, Kakaru, Attack Unit);
¤ Example2: KillUnitAt(1, Kakaru, Attack Unit);
¤ Alternative: Set a Death Count
¤ Example: SetDeaths(1,Mercanary Gunship);

This part is what brings the whole trigger together. The Conditions set everything up. The Dark Swarm has been casted, it recognized the death count, and the unneeded condition was the in range location.
Note: YES, you must make sure that you put the dark swarm is owned by all players or it won't work.
The actions explained that the location was set on the dark swarm and the dark swarm and it was removed, then your attack will take place on that location. in this case i made a small kakaru death effect, however there are more triggers to come, and that is why there were two examples: adding the death count, and creating the effect right in that trigger.
Note: I'm sorry if you don't understand that trigger, i had to copy and paste out of my StarForge map that i made awhile ago with the dark swarm system added.


Trigger
Description:
Effect of the Dark Swarm
Players:
¤ P1
Conditions:
¤ There are two ways to do this
¤ i will start with the first
¤ Bring(P2, exactly, 1, Terran Marine[or any other unit], To location "Attack Unit");
¤ Bring(P1, Exactly,1,Defiler,To "anywhere");
¤ x---------------or----------------x
¤ Deaths(P1,Exactly, 1, Mercanary Gunship);
¤ Bring(P1, Exactly,1,Defiler,To "anywhere");
Actions:
¤ There are many things you can do here
¤ you can do an automatic thing
¤ or you can use randomize switches
¤ PreserveTrigger();
¤ SetSwitch(Randomize, "Rand 1");
¤ SetSwitch(Randomize, "Rand 2");
¤ SetSwitch(Set, "Randomization");
¤ x-----------------or-----------------x
¤ you can do the trigger right then and there
¤ Example: KillUnitAt(Terran Marine,"Attack Unit");
¤ There are other things you may do though

This is the part of the triggers that will set the attack. There are two ways that i have said that you may do this. This depends on what you did in the trigger before, if you didn't set a death count then you will want to do the first set of conditions only. if you did set the death count then you can do either or both of the condition sets.
The actions are what will create the attack, there are two ways i have explained for this. 1) set randomize switches: this will allow you to adjust the percent or chance of one attack or another, explained in this tutorial: http://www.staredit.net/index.php?tutorial=61
2) the second way i explained was just making what would happen right there, the example i gave was that it killed the unit.
another thing you can do with this second set of actions is subtracting a death count that was attached to virtual HP which is explained here: http://www.staredit.net/index.php?tutorial=74
Virtual HP is just a way to attack a unit and eventually kill it via triggers.

Note: it is a good idea to use Hyper Triggers with Dark Swarm Systems.
I hope this was helpful enough for you happy.gif

BTW: If you want a GREAT example of a Dark Swarm Firing System you should also see Tuxedo Templar's map called Rush
Report, edit, etc...Posted by star_crafting on 2006-11-07 at 00:06:54
I SUCK AT MAP MAKING IM SO JEALOUS!!!!!!!!!!!! ranting.gif
Report, edit, etc...Posted by Tuxedo Templar on 2006-11-07 at 01:43:16
I cleaned up my old tutorial on that system earlier today. Dunno if it helps.

ADDITION:
QUOTE([CreaMPuFF)
,Nov 6 2006, 07:18 PM]Can somone explain to me or give me some basic guidelines atleast on how to add an ammo system into my map aswell as weapon changing.  I'm using a darkswarm firing system.
[right][snapback]584691[/snapback][/right]

If you want ammo, set casting cost to 1, and use a counter (like minerals or something) to hold your ammo. When the counter is 0, either set your caster's energy to 0, or add a condition to the shot triggers to prevent it from firing.

For weapons, you'll need a selection system to switch between them (I used a gateway in Rush, for instance), and of course whatever custom firing effects you want when a shot is cast with a given weapon. They're not trivial triggers, but they also shouldn't be anything inordinately complex. I'd just suggest trying out things to find your own way to do it, instead of carbon copying the way I used. It might be a bit of a pain, but if something goes wrong later and you don't understand the triggers your using, it'll be impossible for you to debug the problem. Even if it's a bit slower than having it made for you, it's better than coming to a total halt later.
Report, edit, etc...Posted by Kookster on 2006-11-07 at 03:04:25
Death Triggers are your Friend but remember to stay organized when using them. Rename them according to their use will save you alot of pain!!
Report, edit, etc...Posted by SomeIdiotNerd on 2006-11-08 at 20:15:01
QUOTE
Death Triggers are your Friend but remember to stay organized when using them. Rename them according to their use will save you alot of pain!!


looks like someone didn't read the thread.
Report, edit, etc...Posted by [CreaMPuFF] on 2006-11-09 at 23:27:32
QUOTE(Tuxedo Templar @ Nov 7 2006, 06:43 AM)
I cleaned up my old tutorial on that system earlier today.  Dunno if it helps.

ADDITION:

If you want ammo, set casting cost to 1, and use a counter (like minerals or something) to hold your ammo.  When the counter is 0, either set your caster's energy to 0, or add a condition to the shot triggers to prevent it from firing.

For weapons, you'll need a selection system to switch between them (I used a gateway in Rush, for instance), and of course whatever custom firing effects you want when a shot is cast with a given weapon.  They're not trivial triggers, but they also shouldn't be anything inordinately complex.  I'd just suggest trying out things to find your own way to do it, instead of carbon copying the way I used.  It might be a bit of a pain, but if something goes wrong later and you don't understand the triggers your using, it'll be impossible for you to debug the problem.  Even if it's a bit slower than having it made for you, it's better than coming to a total halt later.
[right][snapback]584916[/snapback][/right]


Thanks Tux smile.gif I should have only said basic guidelines in my OP cuz that's really what I wanted. I'm sure I can figure somthing out for weapon changing on my own if I play around enough.
Report, edit, etc...Posted by Lord-Omega on 2006-11-10 at 10:39:26
ok heres how you do ammo...

first you make it so the player has like 6 minerals and 2 gas, 1 mineral is a bullet and 1 gas is a clip, and trigs would set up like so


Trigger
Description:
Ammo1
Players:
¤ Player
Conditions:
¤ Player has at least 1 minerals
¤ player has at least 1 kill score
Actions:
¤ subtract 1 minerals from player
¤ set kills score to 0
¤ preserve trigger


theres useing ammo

here useing clips


Trigger
Description:
Ammo2
Players:
¤ player
Conditions:
¤ Player has exactly 0 minerals
¤ player has at least 1 gas
Actions:
¤ set ally on all players
¤ wait 1500 milsec's (reload time)
¤ display text " reloading..."
¤ subtract 1 gas from player
¤ add 6 gas for player
¤ preaserve trigger


see how that works
and then you have supply depots or something with locations over them that will reset their gas to 3 or whatever. the reason you have them ally everyone is so they cant attack anyone, i got this off the tutorial database, just type ammo and look it up. wink.gif

oh yea and u need this 1

Trigger
Description:
Ammo3
Players:
¤ player
Conditions:
¤ player acumaltes 0 gas and 0 ore
Actions:
¤ set alliance on all players
¤ preaserve trigger


and then for the supply depot this is what i'd do


Trigger
Description:
Ammo4
Players:
¤ player
Conditions:
¤ Player brings at least 1 any unit to "resupply ammo"
Actions:
¤ set ore to 6
¤ set gas to 3
¤ preserve trigger

Report, edit, etc...Posted by Zeratul_101 on 2006-11-10 at 11:07:03
um... its a DARK SWARM system... there is no kill score...
Report, edit, etc...Posted by Lord-Omega on 2006-11-10 at 13:45:56
eh, opps...
Report, edit, etc...Posted by SomeIdiotNerd on 2006-11-10 at 15:31:37
rofl sorry about the huge amount of triggers, it made me confuse myself...

do you want an explanation for a weapon changing system? because thats not very hard.
Report, edit, etc...Posted by [CreaMPuFF] on 2006-11-10 at 16:20:02
QUOTE(SomeIdiotNerd @ Nov 10 2006, 08:31 PM)
rofl sorry about the huge amount of triggers, it made me confuse myself...

do you want an explanation for a weapon changing system? because thats not very hard.
[right][snapback]586758[/snapback][/right]



No it's alright I've been messing around with it but and I think I figured out a method but if it doesnt work then I might need some more explanation
Next Page (1)