OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: MattE on 18 Jan 2004, 05:54:16

Title: riot
Post by: MattE on 18 Jan 2004, 05:54:16
Let me set the scene.

Civs are rioting (Gimbals tossers) in St. Trinity. There are a few jeeps alight and bottle are flying everywhere. There is a BMP ont the road holding its fire. Next thing we know the BMP has opened up, civs are getting cut down and infantry come tearing over the hill all guns blazing. There is an absolute massacre with the survivors lined up against a wall and shot.

Before I start with the Qs I must state that I use 1.46. So please no res responses.

1. How can I get the civs to trow stuff at the BMP? They just stand there looking stupid.

2. How can I get the BMP to not rotate the entire body? I just want the turrent to rotate.

3. How can I get the civs to scatter in disarray? I would like some to stay and fight, others to hide and others to flee.

4. Is it possible to get troops to run and fire at the same time? And when stationary not really aiming but taking snap shots?

5. How can I simulate a bit of Hand to Hand combat between the civ and the soldiers?

I think that's all for now but stay tuned because there's bound to be more.

Cheers
Title: Re:riot
Post by: j-man on 18 Jan 2004, 06:46:07
1.
Code: [Select]
unitname dotarget bmpname; unitname dofire bmpname
--------------
2. Not really sure. I suppose you could place an empty BMP, put in the BMPs init field
Code: [Select]
this setfuel 0, creat two soldiers, put in one soldiers init field
Code: [Select]
this moveindriver bmpname, put in second soldiers init field
Code: [Select]
this moveingunner bmpname. And if you want to let the BMP move, just put in a trigger, script
Code: [Select]
bmpname setfuel 1.

--------------
3. I'm sure there is a better way than my idea, but you could put
Code: [Select]
unitname allowfleeing 0 for the civs who you want to stay and fight. And
Code: [Select]
unitname allowfleeing 1 for the cives who you want to flee (this dosn't mean that they will flee, it just means that they can if they want too).

-----------------
4. No idea :-\

-----------------
5. OFP is horrible at 2 things, close quater battles and hand-to-hand combat. The closest thing to hand-to-hand combat is
Code: [Select]
untiname playmove "StandStrokeFist" (must be put in a trigger of script). ;)
Title: Re:riot
Post by: MattE on 18 Jan 2004, 08:11:57
Thank you for your help, but of course more help from all would be greatly appreciated.
Title: Re:riot
Post by: Planck on 18 Jan 2004, 17:37:32
Well, this isnt easy because I don't run 1.46, but:

Q2.......Just give the bmp a gunner......... no driver.  then only the turret will turn.
Q4.........I am unaware of any way of getting troops to run AND fire at the same time.  Maybe someone else knows different.


Planck


Title: Re:riot
Post by: macguba on 21 Jan 2004, 03:48:47
To make different civvies do different things, just give them different waypoints.   Control progress through the waypoints with switch triggers.   To make a scene like this look good the best thing to do is give almost every civvy his own set of waypoints.

For hand to hand you'll need to script instructions

#loop
civvy1 domove getpos loon1
loon1 domove getpos civvy1
? loon1 distance civvy1 < 2: goto "hit"
~1
goto "loop"

#hit
basically, getdir loon1 to civvy1 and vice versa
make them face each other
make them both use strokefist


Title: Re:riot
Post by: Pathy on 21 Jan 2004, 12:15:26
I see troops automatically running and firing all the time, but its mainly machine gunners. So make a squad full of machine gunners and put them on "aware"...oh also try maxing thier speed to thier waypoint.

As for a scripted solution to that, i dont know a way to make it definately happen.
Title: Re:riot
Post by: Black Ops 8 on 13 Feb 2004, 22:28:44
Im no scripting genuis but...
basically, what your asking, isnt really possible in OFP(that is, unless you get script/animation addons and everything else) but if there are none of those, then... sry but, your screwed  >:(
Title: Re:riot
Post by: PsyWarrior on 15 Feb 2004, 13:58:26
Greetings,

How about using the "fire" command to force units to discharge their weapons?

If you give them a move, maximum speed wp, and put
this setUnitPos "UP"
in each of their init lines, you should be able to execute a script which causes them to fire:

unit fire "AK74"

Unfortunately, I think that they will only fire one shot. If you repeat it fast enough, you can probably simulate auto fire.

Read about the command HERE (http://www.flashpoint1985.com/docs/comref_102002/data/comref.html)

-Supreme Commander PsyWarrior
-Psychic Productions Studios
Title: Re:riot
Post by: SandVoss on 17 May 2004, 15:41:51
This whole scene would seem to sophisisticated. If u were able to set the side of the civies to "west", then you could order the BMP to first hold fire, and then to open fire on a certain command, ie. a specific unit moves into the place. Hand to hand combat is not possible in OFP, its not a CQB game engine.
Title: Re:riot
Post by: dmakatra on 17 May 2004, 17:27:10
Sandvoss m8, no offence but this thread is 2 months old...

:beat: *Gets Shot* :beat: