Vanishing object

Ask questions, discuss ideas, get answers
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

Psycho wrote: the settings that in one way or other affects the vehicle top speed?
maximum speed you can reach for planes and boats is set by

Code: Select all

ObjectTemplate.setNoPropellerEffectAtSpeed
landvehicles

Code: Select all

ObjectTemplate.setDifferential
Psycho wrote: Is it possible to remove the bombs from fighterplanes in a map without making the objects mapside?
yes, you can removeTemplate the BombRack from the plane. all players must have the code in there maps or the game will crash.

heres a example whit removed spawns from a sub.

Code: Select all

ObjectTemplate.Active Sub7CComplex
ObjectTemplate.removeTemplate 4
when you count the addtemplates you start the count with zero

example

Code: Select all

rem *** AichiValComplex ***
ObjectTemplate.create Bundle AichiValComplex
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate lodAichiValCockpit <----- 0
ObjectTemplate.addTemplate AichiValCamera  <-----------1
ObjectTemplate.setPosition 0.011/0.963/-0.5
ObjectTemplate.addTemplate AichiValEntry  <--------------- 2
ObjectTemplate.setPosition 0/0/-1.169
ObjectTemplate.addTemplate AichiValSeat  <-------  3
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re:

Post by Swaffy »

freddy wrote:

Code: Select all

ObjectTemplate.setNoPropellerEffectAtSpeed
I thought this line refers to the airplane's prop not moving when the vehicle is below the set speed, not the engine itself.

http://bfmods.com/mdt/scripting/ObjectT ... Speed.html
"If an air vehicle drops below the specified speed, the propeller will appear to not be moving."
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Vanishing object

Post by Psycho »

But, freddy. If I have to add that remove template code. I have to do it in the objects "object.con"??
In that case I have to make the vehicles mapside anyway I guess?
I want to live in a created universe. Virtual reality, here I come.
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: Vanishing object

Post by Senshi »

Correct, Swaffy.

"ObjectTemplate.setNoPropellerEffectAtSpeed" has nothing to do with the actual speed.

Also, just defining maxspeed by "Differential" is NOT working. It is one factor amongst many. Best is to just test the individual settings. Don't change any settings except one, which you change to a ridiculously high/low value and test the effect ingame. This especially goes for Differential and Torque, which have relatively abstract effects. Make sure to test flat driving and hillclimbing, because the offroad max speed vs road max speed is defined along the way as well. As said, getting a good balance is always tricky in the start until you get a hang of things. Usually best to start off your meddling off other similar vehicles.

Editor limitations: BC and ED have limitations, both are unstable and prone to crashing every now and then, so always remember, the Save key or shortcut (Ctrl+S) is your very best friend!
Else: BC42 has a max object limitation of 1024 (IIRC), Ed42 has none. Usually Ed42 is the preferred editor for terrain editing, because it has way better texture and height control tools. Some prefer BC42 for object placement because it has snap to ground stuff, but I personally see no big advantage in BC42 (especially as most of my maps have more than 1024 objects) and use Ed42 exclusively.

EDIT: No, you don't have to add that to the object.con, add these two lines to the init.con of your map! It's easy as that :) .
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Vanishing object

Post by Psycho »

Ok, tried to remove the bombs on fighters now. so I added this in the end of init.con:

Code: Select all

rem ***remove objects***

ObjectTemplate.Active SpitfireComplex
ObjectTemplate.removeTemplate 14
rem -----------------------------------

ObjectTemplate.Active BF109Complex
ObjectTemplate.removeTemplate 17
rem -----------------------------------

ObjectTemplate.Active CorsairComplex
ObjectTemplate.removeTemplate 13
rem -----------------------------------

ObjectTemplate.Active MustangComplex
ObjectTemplate.removeTemplate 14
rem -----------------------------------

ObjectTemplate.Active Yak9Complex
ObjectTemplate.removeTemplate 14
rem -----------------------------------

ObjectTemplate.Active ZeroComplex
ObjectTemplate.removeTemplate 14
rem -----------------------------------
And it didn't work.

If it had worked, could I do the same way with
"ObjectTemplate.setSecondaryAmmoIcon "Ammo/Icon_bomb.tga"
ObjectTemplate.setSecondaryAmmoBar ABAmmoBarReloadBar" ?
I want to live in a created universe. Virtual reality, here I come.
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

Swaffy wrote:
freddy wrote:

Code: Select all

ObjectTemplate.setNoPropellerEffectAtSpeed
I thought this line refers to the airplane's prop not moving when the vehicle is below the set speed, not the engine itself.

http://bfmods.com/mdt/scripting/ObjectT ... Speed.html
"If an air vehicle drops below the specified speed, the propeller will appear to not be moving."
Senshi wrote:Correct, Swaffy.

"ObjectTemplate.setNoPropellerEffectAtSpeed" has nothing to do with the actual speed.
Yeah i have also read that many years ago and i remember scratching my head when i couldnt get the zero to fly faster.

but after thoroughly testing on planes, and using that code on boats in our server for many years i know it works like i said in my previous post.

"If an air vehicle drops below the specified speed, the propeller will appear to not be moving." this is not true, as soon you hit the throttle the propeller will spin even if the plane is standing still against a wall in a hangar or something like it.
Senshi wrote: Also, just defining maxspeed by "Differential" is NOT working. It is one factor amongst many.
yes but if the engine is powerful enough the Differential will limit the maxspeed.

Psycho when your ingame playing bring down the console and type "console.showstats 1" you can then see the speed you travelling with along with alot of other things.
Image

Psycho wrote:Ok, tried to remove the bombs on fighters now. so I added this in the end of init.con:
try to add the code to the maps ObjectSpawnTemplates.con be sure to use it in the right game mode (conquest for example)

edit: i tried the code

Code: Select all

ObjectTemplate.Active CorsairComplex
ObjectTemplate.removeTemplate 13
and the bombs was disabled but the ammo icon still there showing a large number of bombs. i dont know if its possible to removetemplate the icon map based but i doubt it.

Image

edit2: i think you should be able to able to change the AmmoIcon with normal activate command, prapably "active corsair" and then ObjectTemplate.setSecondaryAmmoBar for example.

edit3: (lol) i was able to get this to work (quicktest)

Code: Select all

ObjectTemplate.Active Corsair
ObjectTemplate.setNumberOfWeaponIcons 1
Image
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Vanishing object

Post by Psycho »

hehe I now I'm happy Freddy.
Also good to know that I was aiming in the right direction.

I have another question now:

Why are the waterline flickering in game? And its worse you higher up you fly.
A bit into this clip look at the waterline to the right in screen.
http://www.youtube.com/watch?v=O7uKRk6UfH8


Edit: Tried that with the weapon icons. I got the bombs disabled, but the icon is still there, And it shows that I have like 30168 bombs in store hehe.
The reload bar is black though.

I did it like this:

Code: Select all

ObjectTemplate.Active SpitfireComplex
ObjectTemplate.removeTemplate 14
ObjectTemplate.Active BF109Complex
ObjectTemplate.removeTemplate 17
ObjectTemplate.Active CorsairComplex
ObjectTemplate.removeTemplate 13
ObjectTemplate.Active MustangComplex
ObjectTemplate.removeTemplate 14
ObjectTemplate.Active Yak9Complex
ObjectTemplate.removeTemplate 14
ObjectTemplate.Active ZeroComplex
ObjectTemplate.removeTemplate 14

ObjectTemplate.Active SpitfireComplex
ObjectTemplate.setNumberOfWeaponIcons 1
ObjectTemplate.Active BF109Complex
ObjectTemplate.setNumberOfWeaponIcons 1
ObjectTemplate.Active CorsairComplex
ObjectTemplate.setNumberOfWeaponIcons 1
ObjectTemplate.Active MustangComplex
ObjectTemplate.setNumberOfWeaponIcons 1
ObjectTemplate.Active Yak9Complex
ObjectTemplate.setNumberOfWeaponIcons 1
ObjectTemplate.Active ZeroComplex
ObjectTemplate.setNumberOfWeaponIcons 1
Edit: oh no I see what faulth I made. Take no notice of above:).
I want to live in a created universe. Virtual reality, here I come.
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Vanishing object

Post by Psycho »

Thanks again all you.

The speed issue, and no bombs on fighters are solved to my satisfaction.

And all this spawned a new thought in my mind. (as usual).

This methode to remove templates mapside, is it possible to do the opposite?

Let's say I want to add four more machineguns to the mustang that isn't mapside?
Saw that the model in fact have six gunports in the wings, but only two are used in the orginal game. And now that I removed the bombs, maybe it would be idea to soup up the fighter capability.

Edit: It worked.

Code: Select all

ObjectTemplate.Active MustangGuns
ObjectTemplate.addFireArmsPosition 2.4/-0.01/1.8 -1.3/0/0
ObjectTemplate.addFireArmsPosition -2.4/-0.01/1.8 1.3/0/0
ObjectTemplate.addFireArmsPosition 2.0/-0.01/1.8 -1.3/0/0
ObjectTemplate.addFireArmsPosition -2.0/-0.01/1.8 1.3/0/0
ObjectTemplate.setAsynchronyFire 1
ObjectTemplate.roundOfFire 36
I want to live in a created universe. Virtual reality, here I come.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Vanishing object

Post by Swaffy »

Please do us [?] a favor and mark this thread as CSM or SSM. Wait ... I think this is my thread. Oops.

So ...are your questions for CSM or SSM?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Psycho
Posts: 125
Joined: Thu Aug 25, 2011 3:31 am

Re: Vanishing object

Post by Psycho »

Swaffy wrote:Please do us [?] a favor and mark this thread as CSM or SSM. Wait ... I think this is my thread. Oops.

So ...are your questions for CSM or SSM?
And now I feel stupid.... What is that?

Edit: Ah client or serverside?

I guess it is client side for now...
I want to live in a created universe. Virtual reality, here I come.
Post Reply