Simulating a Mortar Attack
- PaladinHeart
- Strider
- Posts: 747
- Joined: Sun Feb 02, 2003 5:28 am
- Contact:
Simulating a Mortar Attack
The best way to do this is by first placing various waypoints around the map. Any invisible entity will do though. Even a light. If any of your player characters have a tagname then that is even better.
Second, you'll need a generic trigger trap. Just make a new entity and in trap type make it a trigger trap. Check the activated and invisible boxes (it'd be silly if the player could see the mortar shells on the ground before they go off).
Now all you need is a a sound file, the dummy (the entity firing the shells), some waypoints, and some other stuff, including triggers.
First you need to find a nice little hidden spot for your mortar shells. You'll need however many you want the dummy to have on hand. Be sure to give them to the same player that owns the dummy (just in case scenery doesn't work when the triggers go into action). It'd be silly to have hundreds, just as it'd be silly to have just one. Consider how many someone might have in a fallouty world. Just roll a six sided die three times if you're having trouble deciding. The lower the number, the easier your task (but the less interesting the encounter will be). I'd do at least 10, but any number is fine.
Now that you've placed your mortar shells, you need to place the invisible entities and some locations. Put the locations and an invisible entity (or waypoint) in places where you thing the player is most likely to go. I would pick places where the player would be most likely to seek cover. If your player's characters have a tagname then you won't need to do this part. But if you do need to, then make sure each waypoint has a different tagname. Nothing else matters. But at least make sure its tagname corresponds to the location's name (like Location = Bomb 1 & Waypoint = WP Bomb 1).
Now that you've done this, make sure you set up the dummy (and whatever entity for his mortar).
Now start a trigger, call it Exploding Bomb 1.
(Edit: Add condition of player X has at least one dummy alive at anywhere (the guy firing the mortar). You'd hate for the mortar to continue firing once the player has killed its operator. This condition stays the same and you'll have no need to change it from trigger to trigger, but is required in all exploding bomb triggers). First condition is player X (the dummy's owning player) see's player Y (the human player of course). Now condition 2 is optional ( I think) but I put it in just in case. Plus it is useful for the next trigger. Player X has at least 1 of Bomb 1 (where Bomb 1 is the name of your first mortar shell). Now go to actions.
First you'll need to relocate the mortar shell. Use the move action, and tell it to move Bomb 1 to player character's tagname, or if you can't do that, you'll need another trigger (which is complicated so Ii'll explain further below). You'll want to activate a sound here, if you have one (preferably a nice mortar sound), also put in a wait command for around 3 to 10 seconds. However long you want it to be. Don't forget to check the Blocking box. And finally, but not least, set script state (don't forget, again, to check the box within this trigger to activate the script state) of Bomb 1 (where bomb 1 is the name of your first mortar shell).
For mortar shell 2, simply copy the whole trigger, and change all the number 1's to number 2. Where Bomb 1 = Bomb 2. Except this time you should take that optional condition and copy it, but change to to Player X has less than 1 of Bomb 1. This will tell this trigger that Bomb 2 is NOT to be fired off until bomb 1 has been spent.
Now you can copy the Bomb 2 trigger and chang all the 2's to 3's, and the 1 to a 2. Its quite simple and you can make a ton of mortar fire within a few minutes (roughly 10 to 30 seconds per mortar shell, depending on how fast you are).
Good luck getting a nice sound file. I haven't located one yet. Im thinking of using the rocket's or the grenade launcher's firing sound.
Trigger 2: Moving the Bomb
name: Moving Bomb 1 to Location WP Bomb 1
If you have to use this approach, then I recommend a longer wait time with the above mentioned triggers, or even randomized wait times so that the player won't be able to simply wait out all of the mortar shells. To best thing to do is have locations covering all the map where the player might try to go, or snipers able to cover any area the player can flee to. This won't be necessary if the dummy player can not see the human player in the safe spots (they won't fire off their shells in that case).
Conditions:
Player X has at least 1 of Bomb 1
Player Y (the human) has at least 1 alive at location Bomb 1.
Actions: Move Bomb 1 to WP Bomb 1
Make sure you check the box, within this trigger, that says preserve. This will tell the trigger to move this bomb to this location whenever the player is seen in this area.
Now, copy this trigger and change WP Bomb 1 to WP Bomb 2. Copy again and change to 3, etc.. Until you have gone through all of the waypoints you have placed. Make sure you change the trigger's title to reflect the different location. Its best to copy triggers as you go along so you can best keep track of how much you've done.
Here comes the tedious part.. You have to copy the first trigger, and change all instancs of Bomb 1 to Bomb 2, and add another condition:
Player X has less than 1 Bomb 1 alive at anywhere.
Now change all instances of Bomb 1 to Bomb 2, except for WP Bomb 1. After you do this, copy the trigger, and change WP Bomb 1 to WP Bomb 2, copy again and change to 3, etc..
Now you have to copy the entire trigger for moving Bomb 2, and change all instances of Bomb 2 to Bomb 3, except for WP Bomb 1, which you leave the same. Now copy this trigger and change WP Bomb 1 to 2, then 3, etc..
This will take a while and you'll hate triggers by the time you're done, but you'll have a very nice simulated mortar fire.
Second, you'll need a generic trigger trap. Just make a new entity and in trap type make it a trigger trap. Check the activated and invisible boxes (it'd be silly if the player could see the mortar shells on the ground before they go off).
Now all you need is a a sound file, the dummy (the entity firing the shells), some waypoints, and some other stuff, including triggers.
First you need to find a nice little hidden spot for your mortar shells. You'll need however many you want the dummy to have on hand. Be sure to give them to the same player that owns the dummy (just in case scenery doesn't work when the triggers go into action). It'd be silly to have hundreds, just as it'd be silly to have just one. Consider how many someone might have in a fallouty world. Just roll a six sided die three times if you're having trouble deciding. The lower the number, the easier your task (but the less interesting the encounter will be). I'd do at least 10, but any number is fine.
Now that you've placed your mortar shells, you need to place the invisible entities and some locations. Put the locations and an invisible entity (or waypoint) in places where you thing the player is most likely to go. I would pick places where the player would be most likely to seek cover. If your player's characters have a tagname then you won't need to do this part. But if you do need to, then make sure each waypoint has a different tagname. Nothing else matters. But at least make sure its tagname corresponds to the location's name (like Location = Bomb 1 & Waypoint = WP Bomb 1).
Now that you've done this, make sure you set up the dummy (and whatever entity for his mortar).
Now start a trigger, call it Exploding Bomb 1.
(Edit: Add condition of player X has at least one dummy alive at anywhere (the guy firing the mortar). You'd hate for the mortar to continue firing once the player has killed its operator. This condition stays the same and you'll have no need to change it from trigger to trigger, but is required in all exploding bomb triggers). First condition is player X (the dummy's owning player) see's player Y (the human player of course). Now condition 2 is optional ( I think) but I put it in just in case. Plus it is useful for the next trigger. Player X has at least 1 of Bomb 1 (where Bomb 1 is the name of your first mortar shell). Now go to actions.
First you'll need to relocate the mortar shell. Use the move action, and tell it to move Bomb 1 to player character's tagname, or if you can't do that, you'll need another trigger (which is complicated so Ii'll explain further below). You'll want to activate a sound here, if you have one (preferably a nice mortar sound), also put in a wait command for around 3 to 10 seconds. However long you want it to be. Don't forget to check the Blocking box. And finally, but not least, set script state (don't forget, again, to check the box within this trigger to activate the script state) of Bomb 1 (where bomb 1 is the name of your first mortar shell).
For mortar shell 2, simply copy the whole trigger, and change all the number 1's to number 2. Where Bomb 1 = Bomb 2. Except this time you should take that optional condition and copy it, but change to to Player X has less than 1 of Bomb 1. This will tell this trigger that Bomb 2 is NOT to be fired off until bomb 1 has been spent.
Now you can copy the Bomb 2 trigger and chang all the 2's to 3's, and the 1 to a 2. Its quite simple and you can make a ton of mortar fire within a few minutes (roughly 10 to 30 seconds per mortar shell, depending on how fast you are).
Good luck getting a nice sound file. I haven't located one yet. Im thinking of using the rocket's or the grenade launcher's firing sound.
Trigger 2: Moving the Bomb
name: Moving Bomb 1 to Location WP Bomb 1
If you have to use this approach, then I recommend a longer wait time with the above mentioned triggers, or even randomized wait times so that the player won't be able to simply wait out all of the mortar shells. To best thing to do is have locations covering all the map where the player might try to go, or snipers able to cover any area the player can flee to. This won't be necessary if the dummy player can not see the human player in the safe spots (they won't fire off their shells in that case).
Conditions:
Player X has at least 1 of Bomb 1
Player Y (the human) has at least 1 alive at location Bomb 1.
Actions: Move Bomb 1 to WP Bomb 1
Make sure you check the box, within this trigger, that says preserve. This will tell the trigger to move this bomb to this location whenever the player is seen in this area.
Now, copy this trigger and change WP Bomb 1 to WP Bomb 2. Copy again and change to 3, etc.. Until you have gone through all of the waypoints you have placed. Make sure you change the trigger's title to reflect the different location. Its best to copy triggers as you go along so you can best keep track of how much you've done.
Here comes the tedious part.. You have to copy the first trigger, and change all instancs of Bomb 1 to Bomb 2, and add another condition:
Player X has less than 1 Bomb 1 alive at anywhere.
Now change all instances of Bomb 1 to Bomb 2, except for WP Bomb 1. After you do this, copy the trigger, and change WP Bomb 1 to WP Bomb 2, copy again and change to 3, etc..
Now you have to copy the entire trigger for moving Bomb 2, and change all instances of Bomb 2 to Bomb 3, except for WP Bomb 1, which you leave the same. Now copy this trigger and change WP Bomb 1 to 2, then 3, etc..
This will take a while and you'll hate triggers by the time you're done, but you'll have a very nice simulated mortar fire.
Last edited by PaladinHeart on Tue Mar 02, 2004 4:29 pm, edited 1 time in total.
"For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. " -John 3:16
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
-
- Vault Dweller
- Posts: 139
- Joined: Wed Aug 20, 2003 2:52 pm
- PaladinHeart
- Strider
- Posts: 747
- Joined: Sun Feb 02, 2003 5:28 am
- Contact:
RE
No problem. Actually that's a pretty short trigger in comparison to some of the more complicated stuff. It was a heck of a lot easier than dialogue :P
Oops! I forgot to mention the move action, lemme edit that..
Umm.. OK now with the movement, locations, etc.. it is more complicated than dialogue. My bad.
You can skip the movement process easily though. Just give one of the premade characters a tagname, and let the player know that they need to edit that premade character for all the triggers in the game to work properly. You can force them to do this by having the player start in a pit, and using move "tagname" unit to location X.
Then you will have a tagname that you can have the mines move to (within the first trigger with the move command I mentioned earlier).
Its a cheap gimmick, but it saves you a lot of work when you have a tagname to work with. You can even have the player's character talk. You can also kill the player with simple triggers if needed. And since the game ends if the main character dies, you can pretty much make the player do whatever you want.
Oops! I forgot to mention the move action, lemme edit that..
Umm.. OK now with the movement, locations, etc.. it is more complicated than dialogue. My bad.
You can skip the movement process easily though. Just give one of the premade characters a tagname, and let the player know that they need to edit that premade character for all the triggers in the game to work properly. You can force them to do this by having the player start in a pit, and using move "tagname" unit to location X.
Then you will have a tagname that you can have the mines move to (within the first trigger with the move command I mentioned earlier).
Its a cheap gimmick, but it saves you a lot of work when you have a tagname to work with. You can even have the player's character talk. You can also kill the player with simple triggers if needed. And since the game ends if the main character dies, you can pretty much make the player do whatever you want.
"For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. " -John 3:16
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
-
- Vault Dweller
- Posts: 139
- Joined: Wed Aug 20, 2003 2:52 pm
ok... This is giving me sweat all over my forehead... Ok, here's the question... Can you save the trigger file and send it cause I'm not getting a few things... The tagname won't be a problem... I'm forcing the player to use certain character for different missions, I can force the player to take a recruit with a tagname...
But I was also thinking... What if the Mortars are fired, not directly at them but more into a large field that when the player enters, they start firing... mortar fire not always hits the person it's suposed to hit
But I was also thinking... What if the Mortars are fired, not directly at them but more into a large field that when the player enters, they start firing... mortar fire not always hits the person it's suposed to hit
- Jimmyjay86
- Hero of the Glowing Lands
- Posts: 2102
- Joined: Thu Apr 18, 2002 4:02 am
- Location: Wisconsin
- Contact:
- PaladinHeart
- Strider
- Posts: 747
- Joined: Sun Feb 02, 2003 5:28 am
- Contact:
RE
Yeah, what JJ said. Just play around with the triggers a bit and you'll understand. My method is for more accurate mortar fire, but you could change it a bit. Maybe even do something easier.
"For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. " -John 3:16
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
-
- Vault Dweller
- Posts: 139
- Joined: Wed Aug 20, 2003 2:52 pm
- requiem_for_a_starfury
- Hero of the Wastes
- Posts: 1820
- Joined: Tue Oct 29, 2002 11:13 am
There's an easier way to set up a mortar, make a weapon entity.
I copied the kick weapon robot rocket, kept it as an unarmed weapon type, decreased the damage but increased the range and damage radius. Then under the weapon mode I changed the animation from 'two' to 'one' (kick to punch). Changed the name to mortar, the range to only long and the weight to 500 and then equipped an actor with it and some unlootable rocket ammo. Then I created an unique other using the mortar sprite and in my map set up a mortar emplacement with sandbags around the front and sides of the mortar and a pallet tile behind the mortar. The all you need to do is make sure the whole thing is set up facing the direction the player will approach from. With the operator on the pallet behind the mortar.
When he sees the player he'll punch, and his hand will appear to go over the mouth of the mortar and then the rocket projectile will come out and you'll get a nice explosion whether it hits or not.
For added effect I've used BoSEE to give it a mortar sound effect, though I need to find a wav file of the mortar's distinctive crump and whistle when it fires.
If you want the player to use the mortar make it lootable and give it an inventory sprite, I'm using the iron pipe coloured green, though I believe there are some mortar inventory sprites in the WW2 mod. Then it might be worth using BoSEE to make an mortar ammo and you're all set. Set up the mortar weapon in the mortar's inventory and since it's so heavy the player will be immobile behind the mortar so they're locked in place while firing the mortar.
If you don't like the rocket projectile firing from the mortar then you can use the projectile invis. though you might want to set up some small zones with a effect spawn entity in each and a simple trigger entity can see player in zone x set object script state of the effect spawn, but personally I think the rocket projectile doesn't look too bad.
I copied the kick weapon robot rocket, kept it as an unarmed weapon type, decreased the damage but increased the range and damage radius. Then under the weapon mode I changed the animation from 'two' to 'one' (kick to punch). Changed the name to mortar, the range to only long and the weight to 500 and then equipped an actor with it and some unlootable rocket ammo. Then I created an unique other using the mortar sprite and in my map set up a mortar emplacement with sandbags around the front and sides of the mortar and a pallet tile behind the mortar. The all you need to do is make sure the whole thing is set up facing the direction the player will approach from. With the operator on the pallet behind the mortar.
When he sees the player he'll punch, and his hand will appear to go over the mouth of the mortar and then the rocket projectile will come out and you'll get a nice explosion whether it hits or not.
For added effect I've used BoSEE to give it a mortar sound effect, though I need to find a wav file of the mortar's distinctive crump and whistle when it fires.
If you want the player to use the mortar make it lootable and give it an inventory sprite, I'm using the iron pipe coloured green, though I believe there are some mortar inventory sprites in the WW2 mod. Then it might be worth using BoSEE to make an mortar ammo and you're all set. Set up the mortar weapon in the mortar's inventory and since it's so heavy the player will be immobile behind the mortar so they're locked in place while firing the mortar.
If you don't like the rocket projectile firing from the mortar then you can use the projectile invis. though you might want to set up some small zones with a effect spawn entity in each and a simple trigger entity can see player in zone x set object script state of the effect spawn, but personally I think the rocket projectile doesn't look too bad.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Twisted by knaves to make a trap for fools,
-
- Vault Dweller
- Posts: 139
- Joined: Wed Aug 20, 2003 2:52 pm
Hey Requiem,
Could you send me some of those materials, it would save me a lot of time because I've tryed the above options but they don't seem to work and if I want to use your option, you need to be a little more specific...
Maybe you can send me the entities files so I can set it up on my map and work out the remaining details on my own...
Let me know,
Greetz
Could you send me some of those materials, it would save me a lot of time because I've tryed the above options but they don't seem to work and if I want to use your option, you need to be a little more specific...
Maybe you can send me the entities files so I can set it up on my map and work out the remaining details on my own...
Let me know,
Greetz
- requiem_for_a_starfury
- Hero of the Wastes
- Posts: 1820
- Joined: Tue Oct 29, 2002 11:13 am
Sorry I can't get online from home at the moment so I can't send or receive anything, but I've changed it to a pistol weapon since sound is linked to the animation and I can't find any coding for an unarmed attack sound effect. Only reload, empty and impact.
Just make a copy of the rocket launcher entity and change it to a pistol (I use a pistol since it's unobtrusive and the animation still has the actor's arm reaching over the mouth of the mortar). The actual mortar entity that will use the mortar sprite can be anything, container is probably best, just place the actor behind and slightly above the mortar. So that they look like they are firing it and can see over the top.
Just make a copy of the rocket launcher entity and change it to a pistol (I use a pistol since it's unobtrusive and the animation still has the actor's arm reaching over the mouth of the mortar). The actual mortar entity that will use the mortar sprite can be anything, container is probably best, just place the actor behind and slightly above the mortar. So that they look like they are firing it and can see over the top.
If you can bear to hear the truth you've spoken
Twisted by knaves to make a trap for fools,
Twisted by knaves to make a trap for fools,
I think with the right triggers, this could be modified to make it seem like the player called in an airstrike or artillery fire on an enemy target.
The mod I'm working on happens in 3030 and not in the same universe as Fallout, so this opens up a lot of possibilities for me.
The mod I'm working on happens in 3030 and not in the same universe as Fallout, so this opens up a lot of possibilities for me.
"You're going to have a tough time doing that without your head, palooka."
- the Vault Dweller
- the Vault Dweller
- PaladinHeart
- Strider
- Posts: 747
- Joined: Sun Feb 02, 2003 5:28 am
- Contact:
RE
Actually you could make an airstrike a lot easier than that (for the player that is). Just put a bunch of detonator trap thingies around the field and designate a certain number 001 to 999. Then when the player finds out what the position is they can press the button.
Of course you may have problems if the player already has a detonator remote the 2nd time they go through the mission. But you could always not make it not that much of a focus on the mission. Therefore it wouldn't matter so much if player X tells player Y that the code is 537. They'd still have 75% of the mission left to do.
---
Bah, just listen to me guessing the remote detonator's name. Its been so long since I played FOT or edited it that it might just be wrong. I've done some tilework recently, but that's still not much of an excuse :-/
Of course you may have problems if the player already has a detonator remote the 2nd time they go through the mission. But you could always not make it not that much of a focus on the mission. Therefore it wouldn't matter so much if player X tells player Y that the code is 537. They'd still have 75% of the mission left to do.
---
Bah, just listen to me guessing the remote detonator's name. Its been so long since I played FOT or edited it that it might just be wrong. I've done some tilework recently, but that's still not much of an excuse :-/
"For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. " -John 3:16
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
- PaladinHeart
- Strider
- Posts: 747
- Joined: Sun Feb 02, 2003 5:28 am
- Contact:
RE
You can also hide stuff like this, letting the player discover a note or such that has the number on it, which will explode a bomb which would then destroy something opening a path.
Or you could have a trigger that opens a door when that entity is activated. I believe I have done that in one of my maps successfully.
Or you could have a trigger that opens a door when that entity is activated. I believe I have done that in one of my maps successfully.
"For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. " -John 3:16
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.
Hopes. Dreams. You have to live these things. If not, they will remain prisoner within the confines of your mind for the rest of your life.