Non static object transform to static

Ask questions, discuss ideas, get answers
User avatar
MillerMod
Posts: 95
Joined: Sat Apr 10, 2010 4:28 pm

Re: Non static object transform to static

Post by MillerMod »

Vilespring wrote:did it work?
Sorry i haven't tried it yet, i have a lot of work in real life. :(
Let's do some modding ...
Image
... and i love the Siege mod for BF1942 also!
User avatar
MillerMod
Posts: 95
Joined: Sat Apr 10, 2010 4:28 pm

Re: Non static object transform to static

Post 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?
Let's do some modding ...
Image
... and i love the Siege mod for BF1942 also!
takiwa
Posts: 134
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

Re: Non static object transform to static

Post 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
Image
User avatar
MillerMod
Posts: 95
Joined: Sat Apr 10, 2010 4:28 pm

Re: Non static object transform to static

Post 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
Let's do some modding ...
Image
... and i love the Siege mod for BF1942 also!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Non static object transform to static

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
MillerMod
Posts: 95
Joined: Sat Apr 10, 2010 4:28 pm

Re: Non static object transform to static

Post 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?
Let's do some modding ...
Image
... and i love the Siege mod for BF1942 also!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Non static object transform to static

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Non static object transform to static

Post by freddy »

Code: Select all

ObjectTemplate.Active eu_well
ObjectTemplate.addTemplate mediclockerRepairpoint
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Non static object transform to static

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Non static object transform to static

Post 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.
Post Reply