OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mr. S.A.S on 21 Jan 2004, 13:44:11

Title: Getting shot at
Post by: Mr. S.A.S on 21 Jan 2004, 13:44:11
How can I make it look like bullets are hitting an area? You know, the little cloudlets that appear where you fire your gun. I am trying to make a guy run past a wall, and have it look like the wall is being sprayed with bullets as he runs past. I cannot make a unit shoot at him, because he'll probably die, :beat:  which I don't want. I want complete control of where the bullets appear to hit, if possible.  ;)
     Also, how do I make a person get hit in a particular area at a particular time? Could it be done using the createvehicle command for both of them to create a bullet wherever I want?  :hmm: I don't know shit about createvehicle so please explain it. :-*
Thanx :cheers:
Title: Re:Getting shot at
Post by: gundernak on 21 Jan 2004, 18:46:56
Add an eventHandler to the running unit for that time he passes the wall.

In this case another unit can fire on him, without causing him to die...
Title: Re:Getting shot at
Post by: dmakatra on 21 Jan 2004, 19:58:47
You can camcreate a bullet and setvelocity it. Try playing around with setdammage for the other problem.

:beat: *Gets Shot* :beat:
Title: Re:Getting shot at
Post by: Mr. S.A.S on 21 Jan 2004, 20:43:46
Thanks guys, that helped. How exactly do I camcreate and setvelocity?
Title: Re:Getting shot at
Post by: icarus_uk on 21 Jan 2004, 22:14:23
"ObjectName" Camcreate [X, Y, Z] ; Where X, Y and Z are the grid referance you want the object to be created.

and

ObjectName SetVelocity [X, Y, Z] ; Where X, Y and Z is the velocity in its three dimensional components.
Title: Re:Getting shot at
Post by: Mr. S.A.S on 22 Jan 2004, 12:50:29
thanx icarus.
Do I replace objectname with bullet in the camcreate syntax? does this also work with grenades?
Title: Re:Getting shot at
Post by: Artak on 22 Jan 2004, 15:01:44
Works with anykind of object you can imagine. I don't know the string name for a bullet though.
Title: Re:Getting shot at
Post by: dmakatra on 22 Jan 2004, 19:59:52
churches? Wow, I wanna see a mission with flying churches. :wow:

:beat: *Gets Shot* :beat: