project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding
31 Oct 2024, 00:00:00 (PRT)
Register Developer Blogs Members List Search Quick Links
PR:BF2 Community Modding Making or wanting help making your own asset? Check in here

Reply
 
Thread Tools Display Modes
Old 2010-09-29, 11:47   #11
AfterDune
Retired PR Developer
Supporting Member

AfterDune's Avatar
Default Re: [Help] How do you add Static Bridge Parts to a Map without Crashing Game Client

If that's possible, PRSP could benefit from that - you know the problem with bots not shooting the destroyable doors and such (unless that got solved without me knowing ). PRMP has them, PRSP needs to get rid of 'em. If it works, put them only in the MP GPO's?

AfterDune is offline Reply With Quote
Old 2010-09-30, 10:39   #12
arm-off-please-help
Default Re: [Help] How do you add Static Bridge Parts to a Map without Crashing Game Client

lol I know this topic is over one year old - I found it googleing the problem about a year ago.
But since we have been trying to do this since many years, I figured I will still post the news.

It is working perfectly fine on our server.
The objects are loaded through pyton everytime the round starts and unloaded when it ends.
I will post the exact script later

(well we run a bf2 demo server, but I don't see why this shouldn't work in PR too)
arm-off-please-help is offline
Last edited by [R-DEV]AfterDune; 2010-09-30 at 10:50..
Reply With Quote
Old 2010-10-01, 17:13   #13
Cobra_SFX
Default Re: [Help] How do you add Static Bridge Parts to a Map without Crashing Game Client

Congrats on finally cracking it Arm-Off, i have been experimenting a lot with this myself, i knew it was possible as some Jap guy done it a while back but he vanished before spilling the beans.

I visited your server a couple of days ago, very nice work, well done

Cobs
Cobra_SFX is offline Reply With Quote
Old 2024-05-11, 03:45   #14
Mrbean
Default Re: [Help] How do you add Static Bridge Parts to a Map without Crashing Game Client

Quote:
Originally Posted by arm-off-please-help View Post
I will post the exact script later
I am still waiting for you to post the script.


Mrbean is offline Reply With Quote
Old 2024-05-23, 15:10   #15
arm-off-please-help
Default Re: [Help] How do you add Static Bridge Parts to a Map without Crashing Game Client

Here is the code.. I just forgot everything else.. where we put it etc.
If I find out I'll post an update "later"



Quote:
import host
import bf2
import time
spawnerTemplates = []
idlist = []
number = 0
#-----------------------------------
GetFromFile = 0
pfadobj = ""#
#-----------------------------------

def delTemplChildLadders(oName):
#Jedes Gebäude des Template 'oName'
for ob in host.omgr_getObjectsOfTemplate(str(oName)):
#Jedes Unterobjekt eines Gebäudes
for child in ob.getChildren():
#Falls der Name des Unterobjekts ('us_carrier' und 'ladder') oder 'pool_ladder' enthält
if "us_carrier" in child.templateName and "ladder" in child.templateName or "pool_ladder" in child.templateName:
host.rcon_invoke("ObjectTemplate.removeTemplate "+child.templateName)

def init():
host.registerGameStatusHandler(onGameStatusChanged )

def deinit():
global spawnerTemplates
global idlist
for myid in idlist:
host.rcon_invoke("Object.active " + str(myid))
host.rcon_invoke("Object.delete")
spawnerTemplates = []
idlist = []

def AddOIDsFromTemplateToList(name):
global idlist
tmplos = str(host.rcon_invoke("object.listObjectsOfTemplate "+str(name)))
for o in tmplos.split('\n'):
if len(o.split(' '))>3:
idlist.append("id"+str(o.split(' ')[3]).strip())

def loadfromfile(pathtofile):
if GetFromFile==1:
wtf = readCon(pathtofile)
entriestmp=""
for key in wtf:
for val in key:
entriestmp += str(val)+str(key[val]).replace('[',' ').replace("'","").strip(']')+'\r\n'
entries = entriestmp.split('Object.create')
entries.pop(0)
ko=0
for entry in entries:
lines = ('Object.create'+entry).splitlines()
pos = []
rot = []
ko=ko+1
for line in lines:
if 'Object.create ' in line:
object = line.split(' ')[1]
if 'Object.absolutePosition ' in line:
pos = str(line.split(' ')[1]).split('/')
pos[0] = float(pos[0])
pos[1] = float(pos[1])
pos[2] = float(pos[2])
if 'Object.rotation ' in line:
rot = str(line.split(' ')[1]).split('/')
rot[0] = float(rot[0])
rot[1] = float(rot[1])
rot[2] = float(rot[2])
if len(rot)>2 and len(pos)>2:
createObject(oName = str(object), oPos = (pos[0],pos[1],pos[2]), oRot = (rot[0],rot[1],rot[2]))#\r\n' % (str(object),str(pos[0]),str(pos[1]),str(pos[2]),str(rot[0]),str(rot[1]),str(rot[2])))
elif len(pos)>2:
createObject(oName = object, oPos = (pos[0],pos[1],pos[2]), oRot = (0.0,0.0,0.0))#\r\n'% (str(object),str(pos[0]),str(pos[1]),str(pos[2])))

def onGameStatusChanged(status):
global number
global spawned
if status == bf2.GameStatus.Playing:
if number == 1:
if GetFromFile==0:
loadthestuff()
else:
loadfromfile(pfadobj)
number = number +1
if status == bf2.GameStatus.EndGame:
number = 0
deinit()

'''def smoke():
host.rcon_invoke("ObjectTemplate.activeSafe EffectBundle e_hgr_SmokeGrenade")
host.rcon_invoke("ObjectTemplate.setNetworkableInf o BasicInfo")
host.rcon_invoke("ObjectTemplate.loopCount 0")
host.rcon_invoke("ObjectTemplate.startAtCreation 1")

host.rcon_invoke("ObjectTemplate.create Bundle lolzsmoke")
host.rcon_invoke("ObjectTemplate.addTemplate e_hgr_SmokeGrenade")
host.rcon_invoke("ObjectTemplate.setPosition 0/0.7/0.4")'''

def loadthestuff():
createObject(oName = "barrier_blocks_high_64m", oPos = (-383.000,24.100,-110.000), oRot = (140.0,0.0,0.0))
createObject(oName = "us_carrier_wasp_front", oPos = (-465.600,3.100,-124.000), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-432.000,24.100,-151.000), oRot = (140.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-474.500,24.100,-144.000), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-476.000,24.100,-145.300), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-475.200,24.100,-144.700), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-444.300,24.100,-119.000), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-443.000,24.100,-119.000), oRot = (50.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-422.337,33.388,-135.743), oRot = (-146.5,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-495.337,33.388,-132.743), oRot = (-146.5,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-435.000,24.100,-196.000), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-394.000,24.100,-245.000), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-349.500,24.100,-249.500), oRot = (140.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-314.000,24.100,-262.000), oRot = (50.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-314.967,34.232,-246.251), oRot = (-146.5,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-372.808,33.388,-259.742), oRot = (-146.5,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-273.000,24.100,-310.900), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-156.000,24.100,-401.000), oRot = (140.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-232.000,24.100,-359.700), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-191.000,24.100,-408.500), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-102.000,24.100,-350.795), oRot = (130.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-236.000,24.100,-305.000), oRot = (140.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-296.000,24.100,-204.000), oRot = (140.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-174.337,35.515,-311.743), oRot = (-146.5,0.0,0.0))
createObject(oName = "us_carrier_wasp_front", oPos = (-138.000,3.100,-441.000), oRot = (-130.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-150.200,24.100,-457.000), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-162.500,24.100,-444.000), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-163.100,24.100,-444.800), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-163.800,24.100,-445.500), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-130.000,24.100,-420.500), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-128.900,24.100,-420.100), oRot = (50.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-128.100,24.100,-419.400), oRot = (50.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-148.495,33.388,-474.09, oRot = (-146.5,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-136.246,33.388,-400.371), oRot = (-146.5,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-180.030,24.705,-414.095), oRot = (140.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-173.932,24.686,-408.965), oRot = (140.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-167.810,24.686,-403.859), oRot = (140.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-161.700,24.686,-398.657), oRot = (140.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-155.700,24.686,-393.500), oRot = (140.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-166.448,25.467,-402.624), oRot = (140.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-163.437,25.491,-400.09, oRot = (140.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-160.372,25.334,-397.530), oRot = (140.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-157.504,25.273,-394.984), oRot = (140.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-154.239,25.273,-392.15, oRot = (140.0,0.0,0.0))
createObject(oName = "constructhouse_01", oPos = (-175.683,31.520,-410.194), oRot = (50.0,0.0,0.0))
createObject(oName = "constcrane_55m_02", oPos = (-168.754,53.231,-391.595), oRot = (-40.0,0.0,0.0))
createObject(oName = "house_medium_05", oPos = (-443.410,32.016,-165.573), oRot = (50.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-449.000,24.882,-172.000), oRot = (140.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-442.600,24.854,-179.600), oRot = (140.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-443.000,24.958,-167.000), oRot = (140.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-436.976,24.899,-162.130), oRot = (-40.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-430.782,24.909,-157.05, oRot = (-40.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-424.619,24.879,-151.924), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-433.036,25.486,-158.902), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-443.994,25.469,-180.536), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-440.911,25.469,-177.902), oRot = (-40.0,0.0,0.0))
createObject(oName = "constcrane_55m_02", oPos = (-449.533,53.211,-172.822), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-429.392,25.499,-156.007), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-425.900,25.465,-153.081), oRot = (-40.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-163.390,24.100,-392.700), oRot = (140.0,0.0,0.0))
createObject(oName = "us_carrier_wasp_front", oPos = (-354.000,3.100,-279.000), oRot = (-40.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-329.817,24.100,-284.000), oRot = (140.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-329.141,24.100,-284.800), oRot = (140.0,0.0,0.0))
createObject(oName = "barrier_blocks_high_64m", oPos = (-328.400,24.100,-285.600), oRot = (140.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-244.964,33.388,-296.675), oRot = (88.0,0.0,0.0))
createObject(oName = "hotel", oPos = (-385.058,41.525,-294.049), oRot = (50.0,0.0,0.0))
createObject(oName = "fishing_hut_pole", oPos = (-259.998,28.000,-276.69, oRot = (-150.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-254.560,33.388,-285.559), oRot = (-146.5,0.0,0.0))
createObject(oName = "fishing_hut_pole", oPos = (-250.077,28.902,-307.456), oRot = (40.0,0.0,0.0))
createObject(oName = "house_low_01_v2", oPos = (-333.224,30.233,-251.31, oRot = (-40.0,0.0,0.0))
createObject(oName = "rock25m", oPos = (-217.763,24.000,-333.265), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-215.881,24.000,-338.233), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-206.900,24.000,-351.816), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-210.936,24.000,-341.299), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-210.579,24.000,-347.345), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-204.379,24.000,-335.907), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-202.879,24.000,-341.712), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-201.088,24.000,-346.317), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-204.037,23.000,-333.172), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-205.568,23.000,-328.000), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-190.000,23.000,-343.145), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-191.957,23.000,-338.889), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-193.888,23.000,-334.169), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-195.961,23.000,-328.531), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-194.154,23.000,-324.000), oRot = (3.5,34.0,-85.0))
createObject(oName = "rock25m", oPos = (-188.017,23.000,-320.000), oRot = (3.5,34.0,-85.0))
createObject(oName = "me_palm_cluster01", oPos = (-219.164,33.388,-325.519), oRot = (88.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-202.620,35.326,-350.37, oRot = (88.0,0.0,0.0))
createObject(oName = "rock25m", oPos = (-195.000,23.000,-315.000), oRot = (3.5,34.0,-85.0))
createObject(oName = "me_palm_cluster01", oPos = (-182.361,33.388,-329.531), oRot = (88.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-199.788,32.690,-319.783), oRot = (88.0,0.0,0.0))
createObject(oName = "pier", oPos = (-214.113,22.500,-318.100), oRot = (-20.0,0.0,0.0))
createObject(oName = "mi_guard_tower_us", oPos = (-218.896,28.300,-336.011), oRot = (90.0,0.0,0.0))
createObject(oName = "mi_antenna", oPos = (-216.846,42.924,-341.686), oRot = (-165.5,0.0,0.0))
createObject(oName = "stonefence_20m", oPos = (-214.784,26.157,-341.144), oRot = (10.0,0.0,0.0))
createObject(oName = "stonefence_20m", oPos = (-203.287,25.850,-331.431), oRot = (90.0,0.0,0.0))
createObject(oName = "me_deadtree01", oPos = (-211.893,29.734,-332.66, oRot = (-20.0,0.0,0.0))
createObject(oName = "me_deadtree01", oPos = (-196.669,28.462,-329.586), oRot = (-20.0,0.0,0.0))
createObject(oName = "house_small_ruin", oPos = (-207.235,28.100,-339.632), oRot = (90.0,0.0,0.0))
createObject(oName = "oil_pump_static_02", oPos = (-191.083,27.868,-337.137), oRot = (-100.0,0.0,0.0))
createObject(oName = "mi_sandbags_shelter", oPos = (-210.648,27.300,-350.531), oRot = (10.0,0.0,0.0))
createObject(oName = "me_deadtree01", oPos = (-206.025,29.754,-344.687), oRot = (-20.0,0.0,0.0))
createObject(oName = "wpipe_valve", oPos = (-190.696,25.638,-329.531), oRot = (103.0,0.0,0.0))
createObject(oName = "fueltank_01", oPos = (-205.442,26.300,-328.899), oRot = (90.0,0.0,0.0))
createObject(oName = "pier", oPos = (-226.000,23.000,-353.800), oRot = (50.0,0.0,0.0))
createObject(oName = "stnwalls_corner_10m_up", oPos = (-254.162,27.550,-299.364), oRot = (50.0,0.0,0.0))
createObject(oName = "stnwalls_corner_10m_up", oPos = (-260.000,27.550,-304.250), oRot = (140.0,0.0,0.0))
createObject(oName = "stnwalls_corner_10m_up", oPos = (-259.289,27.550,-293.265), oRot = (-40.0,0.0,0.0))
createObject(oName = "rock5m", oPos = (-260.000,21.800,-299.375), oRot = (109.0,-2.0,20.0))
createObject(oName = "me_palm_cluster01", oPos = (-271.308,33.388,-301.410), oRot = (88.0,0.0,0.0))
createObject(oName = "concretebarrier", oPos = (-254.912,30.600,-297.82, oRot = (-40.0,0.0,0.0))
createObject(oName = "concretebarrier", oPos = (-261.058,30.600,-303.426), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-257.789,31.300,-300.37, oRot = (-130.0,0.0,0.0))
createObject(oName = "rock5m", oPos = (-260.000,21.800,-298.000), oRot = (109.0,-2.0,20.0))
createObject(oName = "rock5m", oPos = (-259.000,21.800,-300.000), oRot = (109.0,-2.0,20.0))
createObject(oName = "me_palm_cluster01", oPos = (-263.652,33.388,-288.597), oRot = (88.0,0.0,0.0))
createObject(oName = "stnwalls_innersloope_30m", oPos = (-242.600,27.550,-286.500), oRot = (-40.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-230.410,34.897,-275.656), oRot = (-146.5,0.0,0.0))
createObject(oName = "stnwalls_corner_10m_up", oPos = (-265.122,27.550,-298.173), oRot = (-130.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-257.000,24.050,-298.000), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-258.000,25.000,-296.000), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-256.100,26.000,-297.444), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-255.700,27.000,-297.336), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-255.600,28.000,-297.031), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-255.300,29.000,-296.852), oRot = (-40.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-381.478,24.947,-309.657), oRot = (-130.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-384.145,24.894,-311.475), oRot = (50.0,0.0,0.0))
createObject(oName = "plant_box", oPos = (-336.954,24.695,-265.927), oRot = (50.0,0.0,0.0))
createObject(oName = "me_palmtree03", oPos = (-337.464,32.975,-265.26, oRot = (79.5,0.0,0.0))
createObject(oName = "lamppost_highway_02", oPos = (-383.013,27.065,-303.492), oRot = (140.0,0.0,0.0))
createObject(oName = "pipestack_01", oPos = (-368.146,35.655,-284.630), oRot = (-130.0,0.0,0.0))
createObject(oName = "fueltank_01", oPos = (-389.200,51.220,-279.140), oRot = (140.0,0.0,0.0))
createObject(oName = "plant_box", oPos = (-347.132,24.695,-274.561), oRot = (50.0,0.0,0.0))
createObject(oName = "plant_box", oPos = (-356.546,24.695,-282.373), oRot = (50.0,0.0,0.0))
createObject(oName = "plant_box", oPos = (-368.096,24.695,-292.287), oRot = (50.0,0.0,0.0))
createObject(oName = "plant_box", oPos = (-377.699,24.695,-300.189), oRot = (50.0,0.0,0.0))
createObject(oName = "plant_box", oPos = (-387.175,24.695,-308.021), oRot = (50.0,0.0,0.0))
createObject(oName = "lamppost_highway_02", oPos = (-373.652,27.065,-295.542), oRot = (140.0,0.0,0.0))
createObject(oName = "lamppost_highway_02", oPos = (-362.935,27.065,-286.572), oRot = (140.0,0.0,0.0))
createObject(oName = "lamppost_highway_02", oPos = (-351.887,27.065,-277.347), oRot = (140.0,0.0,0.0))
createObject(oName = "lamppost_highway_02", oPos = (-342.348,27.065,-269.312), oRot = (140.0,0.0,0.0))
createObject(oName = "me_palmtree03", oPos = (-347.494,32.988,-273.992), oRot = (79.5,0.0,0.0))
createObject(oName = "me_palmtree03", oPos = (-356.835,32.997,-281.765), oRot = (79.5,0.0,0.0))
createObject(oName = "me_palmtree03", oPos = (-368.592,32.974,-291.684), oRot = (79.5,0.0,0.0))
createObject(oName = "me_palmtree03", oPos = (-378.101,32.985,-299.580), oRot = (79.5,0.0,0.0))
createObject(oName = "me_palmtree03", oPos = (-387.540,32.991,-307.361), oRot = (79.5,0.0,0.0))
createObject(oName = "pier", oPos = (-346.000,23.000,-312.000), oRot = (140.0,0.0,0.0))
createObject(oName = "house_double_03_v2", oPos = (-362.337,31.465,-273.141), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-357.663,31.895,-276.870), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-363.791,31.895,-282.471), oRot = (50.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-360.042,31.947,-278.691), oRot = (-130.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-362.450,31.947,-280.629), oRot = (-130.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-363.633,35.550,-268.592), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-376.660,35.550,-279.522), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-349.610,38.546,-264.493), oRot = (50.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-352.687,38.598,-258.977), oRot = (-130.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-359.282,38.546,-263.220), oRot = (50.0,0.0,0.0))
createObject(oName = "constcrane_55m_02", oPos = (-371.878,52.064,-299.570), oRot = (-40.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-381.655,24.894,-314.421), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-382.725,25.920,-313.000), oRot = (50.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-391.743,55.513,-303.171), oRot = (-130.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-374.933,26.090,-317.196), oRot = (-130.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-373.863,24.947,-318.536), oRot = (-130.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-377.558,26.090,-314.156), oRot = (-130.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-380.212,26.090,-311.127), oRot = (-130.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-376.257,24.947,-315.666), oRot = (-130.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-378.853,24.947,-312.614), oRot = (-130.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-396.432,55.461,-296.722), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-382.426,55.461,-284.473), oRot = (50.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-394.507,55.513,-299.76, oRot = (-130.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-388.000,52.350,-281.000), oRot = (-130.0,0.0,0.0))
createObject(oName = "house_double_04", oPos = (-335.039,29.500,-277.793), oRot = (-130.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-340.652,29.891,-247.621), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-336.327,29.894,-253.064), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-329.435,30.825,-260.196), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-334.536,33.119,-270.896), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-325.112,33.119,-262.990), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-341.804,33.285,-276.452), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-352.603,33.285,-285.589), oRot = (50.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-345.760,33.338,-293.831), oRot = (-130.0,0.0,0.0))
createObject(oName = "plankstack_big_01", oPos = (-344.627,33.338,-278.654), oRot = (-130.0,0.0,0.0))
createObject(oName = "pipestack_01", oPos = (-350.525,33.391,-289.047), oRot = (-130.0,0.0,0.0))
createObject(oName = "house_small3", oPos = (-357.226,26.750,-299.431), oRot = (-40.0,0.0,0.0))
createObject(oName = "house_small3", oPos = (-372.607,26.750,-312.416), oRot = (-40.0,0.0,0.0))
createObject(oName = "me_palm_cluster01", oPos = (-355.589,33.388,-314.022), oRot = (-146.5,0.0,0.0))
createObject(oName = "mi_antenna", oPos = (-344.805,49.528,-282.12, oRot = (-165.5,0.0,0.0))
createObject(oName = "mi_antenna", oPos = (-494.200,41.137,-91.155), oRot = (-165.5,0.0,0.0))
createObject(oName = "mi_antenna", oPos = (-110.820,41.137,-475.387), oRot = (-165.5,0.0,0.0))
createObject(oName = "air_repairstation", oPos = (-116.043,27.913,-469.685), oRot = (50.0,0.0,0.0))
createObject(oName = "air_repairstation", oPos = (-487.490,27.913,-96.607), oRot = (-130.0,0.0,0.0))
createObject(oName = "mi_barrack_mech", oPos = (-169.440,26.588,-432.096), oRot = (50.0,0.0,0.0))
createObject(oName = "mi_barrack_mech", oPos = (-459.918,26.588,-157.843), oRot = (50.0,0.0,0.0))
createObject(oName = "mi_guard_tower_us", oPos = (-430.262,27.880,-157.893), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-423.175,25.472,-150.815), oRot = (-40.0,0.0,0.0))
createObject(oName = "woodsteel_bridge_segment", oPos = (-418.456,24.896,-146.849), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-416.888,25.483,-145.536), oRot = (-40.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-419.587,25.483,-147.930), oRot = (-40.0,0.0,0.0))
createObject(oName = "mi_guard_tower_us", oPos = (-156.894,27.756,-393.491), oRot = (140.0,0.0,0.0))
createObject(oName = "construct_metal_plate", oPos = (-167.000,25.250,-412.000), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-437.798,38.884,-157.375), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-449.039,43.229,-165.811), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-444.759,38.884,-162.352), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-251.959,31.256,-305.854), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-257.315,30.354,-277.51, oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-209.415,28.629,-349.214), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-208.677,26.592,-335.854), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-204.943,26.443,-339.614), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-177.722,36.818,-419.885), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-176.759,36.873,-417.484), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-183.814,36.873,-411.721), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-166.509,36.873,-408.823), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-169.253,36.873,-411.465), oRot = (50.0,0.0,0.0))
createObject(oName = "woodencrate_group2", oPos = (-172.414,36.873,-401.730), oRot = (50.0,0.0,0.0))

AddOIDsFromTemplateToList("ambstat_oiltower_fire")
AddOIDsFromTemplateToList("glowshit")
AddOIDsFromTemplateToList("amdStat_Fountain_waterS pray")

'''def flag():
#rem [ControlPointTemplate: cpname_go_32_thelolz]
host.rcon_invoke("ObjectTemplate.activeSafe Bundle flagpole")
host.rcon_invoke("ObjectTemplate.setNetworkableInf o BasicInfo")
host.rcon_invoke("ObjectTemplyate.create ControlPoint cpname_go_32_thelolz")

host.rcon_invoke("ObjectTemplate.activeSafe ControlPoint cpname_go_32_thelolz")
host.rcon_invoke("ObjectTemplate.setNetworkableInf o ControlPointInfo")
host.rcon_invoke("ObjectTemplate.modifiedByUser nla")
host.rcon_invoke("ObjectTemplate.isNotSaveable 1")
host.rcon_invoke("ObjectTemplate.hasMobilePhysics 0")
host.rcon_invoke("ObjectTemplate.hasCollisionPhysi cs 1")
host.rcon_invoke("ObjectTemplate.physicsType Mesh")
#rem -------------------------------------
host.rcon_invoke("ObjectTemplate.addTemplate flagpole")
#rem -------------------------------------
host.rcon_invoke("ObjectTemplate.setControlPointNa me cpname_go_32_thelolz")
host.rcon_invoke("ObjectTemplate.radius 10")
host.rcon_invoke("ObjectTemplate.team 1")
host.rcon_invoke("ObjectTemplate.controlPointId 19")
host.rcon_invoke("ObjectTemplate.timeToGetControl 20")
host.rcon_invoke("ObjectTemplate.timeToLoseControl 20")
host.rcon_invoke("ObjectTemplate.unableToChangeTea m 0")

host.rcon_invoke("Object.create cpname_go_32_thelolz")
host.rcon_invoke("Object.absolutePosition -648.243/43.400/-517.377")
host.rcon_invoke("Object.layer 3")

Cobra_SFX
ObjectTemplate.active ambstat_oiltower_fire
ObjectTemplate.setNetworkableInfo BasicInfo
Cobra_SFX
if v_arg1 == host
Cobra_SFX
Object.create ambstat_oiltower_fire
Object.absolutePosition -27.145/24.993/-119.73
Object.layer 1'''

def createObject(oName, oPos, oRot):
global idlist
childs=[]
if not oName in spawnerTemplates:
createSpawnerTemplate(oName)
idlist.append(host.rcon_invoke("Object.create sbx_"+ oName).strip())
host.rcon_invoke("Object.absolutePosition " + str(oPos[0]) + "," + str(oPos[1]) + "," + str(oPos[2]))
host.rcon_invoke("Object.rotation " + str(oRot[0]) + "," + str(oRot[1]) + "," + str(oRot[2]))
host.rcon_invoke("Object.layer 1")
host.rcon_invoke("Object.team 2")

def createSpawnerTemplate(oName):
global spawnerTemplates
host.rcon_invoke("ObjectTemplate.active "+oName)
#delTemplChildLadders(oName)
host.rcon_invoke("ObjectTemplate.setNetworkableInf o BasicInfo")
#LADDER BUG - TOO MANY LADDERS - MAX -> ladderarray.length= 256, If a ladder gets deleted by the game engine (e.g. because it's utterly under-water),
#the ladder spawning afterwards glitches (wrong climb-up-animation.coordinate)
host.rcon_invoke("ObjectTemplate.create ObjectSpawner sbx_" + oName)
host.rcon_invoke("ObjectTemplate.activeSafe ObjectSpawner sbx_" + oName)
host.rcon_invoke("ObjectTemplate.setNetworkableInf o BasicInfo")
host.rcon_invoke("ObjectTemplate.setObjectTemplate 1 " + oName)
host.rcon_invoke("ObjectTemplate.setObjectTemplate 2 " + oName)
host.rcon_invoke("ObjectTemplate.minSpawnDelay 700000")
host.rcon_invoke("ObjectTemplate.maxSpawnDelay 900000")
spawnerTemplates.append(oName)

def readCon(conFile):
# ----------------------------------------------
# FIRE'S SIMPLE CON PARSER
#
# CONTACT:
# [email protected]
# www.flmod.com
#
# USAGE (READ):
# config = readCon(file)
# Returns a list: [{key1: [values1]}, {key2: [values2, values2]}, ...]
#
# USAGE (WRITE):
# success = writeCon(config, file)
# ----------------------------------------------

# ----------------------------------------------
# Imports
# ------
config = []
rem = False

# ----------------------------------------------
# Open the file
# ----------------------------------------------

try:
f = file(conFile, 'r')
lines = f.readlines()
f.close()
except IOError: # Damn..
return config


for line in lines:
# ----------------------------------------------
# Replace tabs etc.
# ----------------------------------------------
line = line.replace('\t', ' ')
line = line.strip(' \n')

# ----------------------------------------------
# Remove comments
# ----------------------------------------------
if line[:4].lower().strip() == 'rem':
continue
elif line[:9].lower().strip() == 'beginrem':
rem = True
continue
elif line[:7].lower().strip() == 'endrem':
rem = False
continue
else:
if rem:
continue

# ----------------------------------------------
# Find the end of the key
# ----------------------------------------------
pos = line.find(' ')
if pos < 0: # Not found
continue

# ----------------------------------------------
# Get the key
# ----------------------------------------------
key = line[os]

# ----------------------------------------------
# Get the values
# ----------------------------------------------
values = line[pos + 1:].split(' ')
for value in values:
value = value.strip(' ')

config.append({key: values})
# ----------------------------------------------
# Return the list
# ----------------------------------------------
return config
# --------------------------------------------------------------------------------------------
arm-off-please-help is offline Reply With Quote
Old 2024-05-23, 15:19   #16
arm-off-please-help
Default Re: [Help] How do you add Static Bridge Parts to a Map without Crashing Game Client

Seems like Archive archived the tutorial!

https://web.archive.org/web/20120525...php?topic=1241
arm-off-please-help is offline Reply With Quote
Reply


Tags
add, bridge, client, crashing, game, map, parts, static

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 05:29.