OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mike on 11 Sep 2002, 01:50:18
-
In a previous game I played (cant recall which) I saw dead bodys auto "Hide Body" after they were killed.
Looked like when you hide a body with a black op.. Does anyone have a script or idea on how to make a script do that?
Preferably wait 45-60 seconds before body dissapears...
And/Or Does anyone know the command to delete infantry like the deleteVehicle command? If is exists..
Thanks! :cheers:
-
i'll answer the second one:
i think deletevehicle does delete infantry
-
thanks 4 the info, Ill try it out..
Will DeleteVehicle UnitName work for the name of a group? ??? Or should I shut up and try it? ;D
-
If it doesn't work for a group, and I doubt it will, try something along the lines of
"_x deletevehicle" forEach units group alpha
deletevehicle should delete infantry.
As for the disappearing body trick, I don't know how to do it but I do know how its done ..... basically you need a script which lowers the body below ground level. There may be one in script snippets I don't know, if there is you can easily add a delay to it. If there isn't you could probably use a stream of setpos commands, keeping x and y the same and taking z slowly from 0 to say -2.
-
I cant script too well yet... actually just starting..
"_x deletevehicle" forEach units group alpha
Can this be used in a waypoint or trigger? (without exec a script?)
For the "hide Body" thing.. It does lower 2 meters down, then it is deleted.. Atleast Im pretty sure it gets deleted, the shadow dissapears all of a sudden after its well under. Deleting is the feature im looking for, to reduce lag in long missions, or big battles..
-
It certainly can be used in a WP or trigger. In general all lines of script can be used equally in WP, trigger or script file. Don't use player WPs for making things happen though, the player may miss it - use triggers instead.
I'm pretty much a noob myself and I haven't tested the command, so you may have to play about with it a little. Look at both the official and unofficial command reference guides, they usually explain things in slightly different ways which cetainly helps me to get a better understanding of how some of these things work.
It would make sense to delete the body after its been buried. It will help with lag, but the big difference comes when the dude dies - a stationary body doesn't take up too much CPU time. I find the real killers on lag are vehicles and particularly choppers.
You can also use createUnit, createVehicle or camCreate commands to create stuff during the mission - no point in having a base full of soldiers if the player isn't going to get there for 20 minutes.
-
Ya im making my first mission that I clean up before and after myself.. (creat as I go, delete as I leave)
Its going ok so far, havent gone through much depth, but cutscenes work great for creating and deleting stuff... Enough babaling from me..
Could you give an example for each createunit, createvehicle and camcreate??
Ive camcreated items like a LGB or a flare n such...
but how would I creat a group of units on a "trigger or gamelogic" or a tank / heli?
I suppose this is how people get vehicles to respawn? deletevehicle/createvehicle.. ???
And Unrelated (thought about it now) could you use a "this setdammage 0" command to repair a dead vehicle? or does it need to be alive?
-
Blimey. Right, here's a line of script from my forthcoming but as yet unnamed armoured mission
mine0 = "mine" camCreate getmarkerpos "marker1_0"
which should be fairly self explanatory. I've never actually used the others and there is a bunch of parameters that you have to get right, but the command refs should sort you out. I don't know if you can create a group in one go. But if you're creating stuff for cutscenes you probably already know more about it than I do. There's no problem about creating stuff at a marker position, that I do know.
The only thing I know about respawning is that the description.ext file comes into it.
On the setdammage thing I dunno. Don't see why not (but then Flashpoint is a fickle mistress). Try it. You might have to resurrect the crew seperately.
-
:cheers: