OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Echo5Hotel on 01 Dec 2004, 16:40:36

Title: Script idea.
Post by: Echo5Hotel on 01 Dec 2004, 16:40:36
I was thinking about a CSAR mission that I would like to create and realized that I couldn't because there is no way for a player to actually carry a wounded soldier in th game as far as I know.  Would it be possible to create a script to actually have a player carry a wounded soldier?  It could add a lot of possibilites to single and multi-player missions.
Title: Re:Script idea.
Post by: Triggerhappy on 01 Dec 2004, 22:16:59
it would be possible, but it would probably look wierd because there aren't any good anims to use, maybe in an anim pack but not that come with the game. except maybe the heal at medic anim for when you're prone
Title: Re:Script idea.
Post by: Mr.Peanut on 09 Dec 2004, 17:00:43
I think it can be done fairly easily, and is a good idea.

Consider all the possible situations.
For example:

1)Is wounded allowed to jump out of bearer's arms?
2)Bearer is crippled or killed while carrying wounded. Wounded dropped.
3)Wounded is killed while being carried. Wounded dropped.
4)Bearer and or wounded attempt to board a vehicle. Wounded dropped.
5)Bearer and or wounded attempt to use weapon/binoculars or do any other action. Wounded is dropped.
6)Another player attempts to pick up either wounded or bearer. Wounded is dropped.

If anyone has a suggestion on how to deal with 5) I will attempt to write this script. I haven't a clue how to trap actions.

Who cares if it doesn't look that good as long as it works!
Title: Re:Script idea.
Post by: Blip on 10 Dec 2004, 01:58:29
Check this link out,

http://www.ofpec.com/yabbse/index.php?board=10;action=display;threadid=18687;start=0 (http://www.ofpec.com/yabbse/index.php?board=10;action=display;threadid=18687;start=0)

Blip
Title: Re:Script idea.
Post by: Mr.Peanut on 10 Dec 2004, 03:02:29
Might as well delete this thread now!
Title: Re:Script idea.
Post by: Blip on 11 Dec 2004, 22:58:12
There is also a script that simulates carrying a guy on a gurney in the editors depot under the misc. section

Later,

Blip
Title: Re:Script idea.
Post by: General Barron on 14 Dec 2004, 04:08:18
I think it can be done fairly easily, and is a good idea.

Consider all the possible situations.
For example:

1)Is wounded allowed to jump out of bearer's arms?
2)Bearer is crippled or killed while carrying wounded. Wounded dropped.
3)Wounded is killed while being carried. Wounded dropped.
4)Bearer and or wounded attempt to board a vehicle. Wounded dropped.
5)Bearer and or wounded attempt to use weapon/binoculars or do any other action. Wounded is dropped.
6)Another player attempts to pick up either wounded or bearer. Wounded is dropped.

If anyone has a suggestion on how to deal with 5) I will attempt to write this script. I haven't a clue how to trap actions.

Who cares if it doesn't look that good as long as it works!


Actually, you can get around these complications surprisingly easily. I did it by making a looping carry animation, that essentially forces the bearer to walk forward. He can't do any other type of movement, except turn left or right. Then you just have a script that constantly setpos's the carried man to where the bearer is, again using a custom animation. The bearer initiates this script via an action attatched to the corpse to be carried.

In that looping script, you check to see if the player has stopped moving (speed ~ 0). If that happens, the script ends. This can happen by either the bearer being killed, or by the bearer using another action that plays a non-moving animation.

This works surprisingly well, and you can even order AI under your control to move to certain locations this way. The only reason why I don't have it fully working is because I don't have the pick up/put down animations working properly yet, and it is untested in MP.
Title: Re:Script idea.
Post by: penguinman on 14 Dec 2004, 06:30:22
Quote
In that looping script, you check to see if the player has stopped moving (speed ~ 0). If that happens, the script ends. This can happen by either the bearer being killed, or by the bearer using another action that plays a non-moving animation.

but what if the player is just stopping to take cover under fire.
Title: Re:Script idea.
Post by: pexmo on 14 Dec 2004, 14:19:02
Blip: whats the script called that u mentioned being under misc in ed depot? Cant find one fitting what you described.
Title: Re:Script idea.
Post by: SEAL84 on 14 Dec 2004, 23:45:29
but what if the player is just stopping to take cover under fire.

I'd imagine that if you're taking cover from enemy fire, you'd put the guy you're carrying down, then pick him up when you're ready to move again.
Title: Re:Script idea.
Post by: Blip on 15 Dec 2004, 01:37:59
pexmo-

Here is a link to the stretcher simulation.  It works well, although technically there is no stretcher.

http://www.ofpec.com/editors/resource_view.php?id=472 (http://www.ofpec.com/editors/resource_view.php?id=472)

Blip  :joystick: