Page 2 of 4

Re: Non static object transform to static

Posted: Sun Mar 02, 2014 1:48 pm
by MillerMod
Vilespring wrote:did it work?
Sorry i haven't tried it yet, i have a lot of work in real life. :(

Re: Non static object transform to static

Posted: Mon Mar 03, 2014 1:12 pm
by MillerMod
Before i try this i have a nother question: is it possible to make a static object (eu_well) to heal the nearby soldiers? So can the eu_well will act like a mediclocker?

Re: Non static object transform to static

Posted: Thu Mar 06, 2014 8:44 am
by takiwa
sure, just bundle the heal code to the object...

Code: Select all

rem
rem *** medicwell ***
rem
ObjectTemplate.create Bundle medicwell
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.geometry well_eu_M1
ObjectTemplate.aiTemplate mediclocker_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1

rem -------------------------------------
ObjectTemplate.addTemplate medicwellRepairpoint
ObjectTemplate.setPosition 0/0/0.5
ObjectTemplate.setRotation 0/0/0

ObjectTemplate.create SupplyDepot medicwellRepairpoint
ObjectTemplate.radius 2
ObjectTemplate.team 0
ObjectTemplate.workOnVehicles 0
ObjectTemplate.workOnSoldiers 1
ObjectTemplate.setHealth -1 4.0 0

Re: Non static object transform to static

Posted: Mon May 05, 2014 10:26 pm
by MillerMod
takiwa wrote:sure, just bundle the heal code to the object...

Code: Select all

rem
rem *** medicwell ***
rem
ObjectTemplate.create Bundle medicwell
ObjectTemplate.saveInSeparateFile 1
ObjectTemplate.geometry well_eu_M1
ObjectTemplate.aiTemplate mediclocker_m1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1

rem -------------------------------------
ObjectTemplate.addTemplate medicwellRepairpoint
ObjectTemplate.setPosition 0/0/0.5
ObjectTemplate.setRotation 0/0/0

ObjectTemplate.create SupplyDepot medicwellRepairpoint
ObjectTemplate.radius 2
ObjectTemplate.team 0
ObjectTemplate.workOnVehicles 0
ObjectTemplate.workOnSoldiers 1
ObjectTemplate.setHealth -1 4.0 0
THX!

But where to put this code? :S

Re: Non static object transform to static

Posted: Tue May 06, 2014 3:48 am
by Swaffy
MillerMod wrote:But where to put this code? :S
You can stick it at the bottom of the Objects.con for the Well object in the Objects.rfa file.

Re: Non static object transform to static

Posted: Tue May 06, 2014 10:39 am
by MillerMod
Swaffy wrote:
MillerMod wrote:But where to put this code? :S
You can stick it at the bottom of the Objects.con for the Well object in the Objects.rfa file.
Well i just want to add this in a map, so i do not want to modify the objects.rfa file.

Will it work only in a custom map?

Re: Non static object transform to static

Posted: Tue May 06, 2014 2:05 pm
by Swaffy
MillerMod wrote:
Swaffy wrote:
MillerMod wrote:But where to put this code? :S
You can stick it at the bottom of the Objects.con for the Well object in the Objects.rfa file.
Well i just want to add this in a map, so i do not want to modify the objects.rfa file.

Will it work only in a custom map?
Excuse my last comment. The code is to make a new static object using the 3D model of the Well object.

You can place it in "bf1942/levels/Level_Name/Objects/Object_Name/Objects.con". The part that says "Objects/Object_Name/Objects.con" you might have to set up yourself. You can create a new text (Objects.txt) document and change the file extension to con (Objects.con) so that you can put your code in.

In the "init.con" file in the map's main directory (bf1942/levels/Level_Name/) put a line that goes something like this:
run Objects/Object_Name/Objects

I usually put it under the part that says "run Init/SkyAndSun" and "run Init/Terrain" just to keep the run commands in the same area.

Re: Non static object transform to static

Posted: Tue May 06, 2014 7:29 pm
by freddy

Code: Select all

ObjectTemplate.Active eu_well
ObjectTemplate.addTemplate mediclockerRepairpoint

Re: Non static object transform to static

Posted: Wed May 07, 2014 1:32 am
by Swaffy
freddy wrote:

Code: Select all

ObjectTemplate.Active eu_well
ObjectTemplate.addTemplate mediclockerRepairpoint
I think this is good for using the already-existing Well object. But if he wants to make a separate object then the previous code would be adequate. Though this code is shorter and simpler to implement.

Re: Non static object transform to static

Posted: Wed May 07, 2014 9:30 am
by freddy
yes that was my thought, he doesn´t seem very used to modding so i thought i post a quick way to give that well some love.