OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: privateknez on 18 Jan 2011, 12:51:54

Title: objects not shoving up at high speeds
Post by: privateknez on 18 Jan 2011, 12:51:54
I have a problem... i created a tankshell in oxygen, and at speeds above cca 400 m/s it wont show up in game... it is there just the model is not showing up... after it slows down below the cca 400 m/s (or i set the init speed below that) it shows up... Is this hardcoded in the game or is there a solution?
Title: Re: objects not shoving up at high speeds
Post by: Gnat on 18 Jan 2011, 17:21:25
Hi privateknez
I can only speculate on my long past history with OFP and similarities with ArmA and ArmAII
If your using a shell simulation (is it called shotShell? ), you may well find thats a hard-code limit.
If you change the ammo simulation to shotBullet or similar may get you a different effect.

Someone whos coding OFP might be able to comment further.
Title: Re: objects not shoving up at high speeds
Post by: Lenyoga on 18 Jan 2011, 18:05:58
I encountered the same problem years ago - I ended up using rockets and grenades (grenade probably won't work with tanks) with custom models. The problem here is that they don't really behave like shells - but you could use a 'fired' eventhandler to make something like a 'setVelocity ...' loop.
Title: Re: objects not shoving up at high speeds
Post by: privateknez on 18 Jan 2011, 19:45:52
yes it shotshell simulation... its hardcoded  :(... that sucks. would a script for this take too much cpu? i noticed on some mods that are script packed the fps drops a lot.
Title: Re: objects not shoving up at high speeds
Post by: Lenyoga on 19 Jan 2011, 16:53:56
You can keep the scripts pretty small - I once made a fired EH which created a light source for some kind of laser cannon. Will probably work with models too: just create a fired EH, define the bullet, shell or whatever, create the object, make a loop and use a setpos (maybe also a setdir) command. Exec sth like this in the fired EH:

Code: [Select]
_shot = nearestobject [_this select 0, _this select 4]
_obj = "objName" camcreate getpos _shot

#loop
_pos = getpos _shot
_obj setpos _pos
~0.001
? _shot == _shot : goto "loop"

deleteVehicle _obj

The object\Shell model should have no FireGeometry LOD, else it will explode right away.

And don't forget to execute something like this first (otherwise every fired shot by the unit will be affected):

Code: [Select]
? (_this select 4) == "NameOfAmmo" : _this exec "pathOfWhatIdidAbove.sqs";
...
exit
I hope my twisted words are somehow helpful.