TOW Objectives

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

Nuggets, did you ever get the map to run ? Your loading problem was cos its a spearhead map. I cant seem to get the script working.
Below is the logfile from when I try to run it and also the script I am using......

^~^~^ Can't find 0.tga
Couldn't find image for shader 0
sv_maxclients will be changed upon restarting.
g_gametype will be changed upon restarting.
g_gametypestring will be changed upon restarting.
cheats will be changed upon restarting.
------ Server Initialization ------
Server: obj/mp_peenemunde_tow
Called FadeSound with: 0.000000
Called FadeSound with: 0.000000
------- S_StopAllSounds (stop music) -------
------- S_StopAllSounds Complete-------
------- S_StopAllSounds (stop music) -------
------- S_StopAllSounds Complete-------
Called FadeSound with: 0.000000
Setting up Shaders
UI_DrawConnect called
LoadLibrary (mainta/gamex86.dll)
==== InitGame ====
sizeof(Actor) == 3020
Magic sizeof actor numer: 2956

------------------
Event system initialized: 178 classes 1468 events 1045216 total memory in response list

==== CleanupGame ====
CM_LoadMap( maps/obj/mp_peenemunde_tow.bsp, 0 )
-------------------- Spawning Entities -----------------------
soundtrack switched to .
-------------------- Actual Spawning Entities -----------------------
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/corona_red_bright.tik
*!*!*!* Objects are not allowed for use in the game. Make it a static model or a script model as needed.
spawn 'addon_fx_corona_red-bright': 0.56 seconds
^~^~^ Add the following line to the *_precache.scr map script:
cache models/statweapons/p_granatwerfer_base.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/weapons/mg42carryable.tik
^~^~^ Classname ai_actor used, but no model was set, using Object.
^~^~^ Add the following line to the *_precache.scr map script:
cache models/vehicles/opeltruck_nonvehicle.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/statweapons/mg42_gun.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/miscobj/coffee_kettle.tik
^~^~^ Classname ai_actor used, but no model was set, using Object.
^~^~^ Add the following line to the *_precache.scr map script:
cache models/vehicles/m3.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/corona_red.tik
^~^~^ Classname ai_actor used, but no model was set, using Object.
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/corona_green_bright.tik
-------------------- Actual Spawning Entities Done ------------------ 885 ms
^~^~^ Add the following line to the *_precache.scr map script:
cache models/statweapons/p_granatwerfer_cannon.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/static/v2.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/items/pulse_explosive.tik
bad token:
TOKEN_LOGICAL_OR:
||

if ( level.switch1owner == 1 ) || ( level.switch1owner == 0 ) //1 meaning allies //0 meaning neutral (maps/obj/mp_peenemunde_tow.scr, 88)
if ( level.switch1owner == 1 ) ^

^~^~^ Script file compile error: Couldn't parse 'maps/obj/mp_peenemunde_tow.scr'
^~^~^ Game (Event: 'setthread', Object: 'TriggerUse') : Script 'maps/obj/mp_peenemunde_tow.scr' was not properly loaded

^~^~^ Game (Event: 'setthread', Object: 'TriggerUse') : Script 'maps/obj/mp_peenemunde_tow.scr' was not properly loaded

^~^~^ Game (Event: 'setthread', Object: 'TriggerUse') : Script 'maps/obj/mp_peenemunde_tow.scr' was not properly loaded

^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'World') : Couldn't convert string to vector - malformed string '100'
0 teams with 0 entities
ScriptMaster::GetScript: Script 'maps/obj/mp_peenemunde_tow.scr' was not properly loaded

190 entities spawned
254 simple entities spawned
0 entities inhibited
-------------------- Spawning Entities Done ------------------ 1110 ms
*!*!*!* 'models/fx/corona_red_bright.tik' was spawned as an Object entity at (2528 -1712 163). Should be made into a static model or script model (#1).
*!*!*!* 'models/miscobj/coffee_kettle.tik' was spawned as an Object entity at (4166 1048 52). Should be made into a static model or script model (#2).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-2112 -4314 184). Should be made into a static model or script model (#3).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1984 -4314 184). Should be made into a static model or script model (#4).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1856 -4314 184). Should be made into a static model or script model (#5).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1728 -4314 184). Should be made into a static model or script model (#6).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1600 -4314 184). Should be made into a static model or script model (#7).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1472 -4314 184). Should be made into a static model or script model (#8).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1344 -4314 184). Should be made into a static model or script model (#9).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1344 -4005 184). Should be made into a static model or script model (#10).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1472 -4005 184). Should be made into a static model or script model (#11).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1600 -4005 184). Should be made into a static model or script model (#12).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1728 -4005 184). Should be made into a static model or script model (#13).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1856 -4005 184). Should be made into a static model or script model (#14).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1984 -4005 184). Should be made into a static model or script model (#15).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-2112 -4005 184). Should be made into a static model or script model (#16).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-2112 -5274 184). Should be made into a static model or script model (#17).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1984 -5274 184). Should be made into a static model or script model (#18).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1856 -5274 184). Should be made into a static model or script model (#19).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1728 -5274 184). Should be made into a static model or script model (#20).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1600 -5274 184). Should be made into a static model or script model (#21).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1472 -5274 184). Should be made into a static model or script model (#22).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1344 -5274 184). Should be made into a static model or script model (#23).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1344 -4965 184). Should be made into a static model or script model (#24).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1472 -4965 184). Should be made into a static model or script model (#25).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1600 -4965 184). Should be made into a static model or script model (#26).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1728 -4965 184). Should be made into a static model or script model (#27).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1856 -4965 184). Should be made into a static model or script model (#28).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-1984 -4965 184). Should be made into a static model or script model (#29).
*!*!*!* 'models/fx/corona_red.tik' was spawned as an Object entity at (-2112 -4965 184). Should be made into a static model or script model (#30).
*!*!*!* 'models/fx/corona_green_bright.tik' was spawned as an Object entity at (-1100 -732 162). Should be made into a static model or script model (#31).
*!*!*!* 'models/fx/corona_red_bright.tik' was spawned as an Object entity at (-1100 -704 162). Should be made into a static model or script model (#32).
*!*!*!* 'models/fx/corona_green_bright.tik' was spawned as an Object entity at (-309 -3668 162). Should be made into a static model or script model (#33).
*!*!*!* 'models/fx/corona_red_bright.tik' was spawned as an Object entity at (-282 -3668 162). Should be made into a static model or script model (#34).
*!*!*!* 'models/fx/corona_green_bright.tik' was spawned as an Object entity at (2506 -1715 162). Should be made into a static model or script model (#35).
An objective has been added!
^~^~^ Add the following line to the *_precache.scr map script:
cache models/vehicles/vehiclesoundentity.tik


-----------PARSING 'ubersound/uberdialog.scr' (SERVER)------------
Any SetCurrentTiki errors means that tiki wasn't prefetched and tiki-specific sounds for it won't work. To fix prefetch the tiki. Ignore if you don't use that tiki on this level.
CG_Command_ProcessFile: ubersound/uberdialog.scr
Parse/Load time: 0.454000 seconds.
-------------PARSING 'ubersound/uberdialog.scr' DONE (SERVER)---------------



-----------PARSING 'ubersound/ubersound.scr' (SERVER)------------
Any SetCurrentTiki errors means that tiki wasn't prefetched and tiki-specific sounds for it won't work. To fix prefetch the tiki. Ignore if you don't use that tiki on this level.
CG_Command_ProcessFile: ubersound/ubersound.scr
Parse/Load time: 0.078000 seconds.
-------------PARSING 'ubersound/ubersound.scr' DONE (SERVER)---------------

------ Server Initialization Complete ------ 3.39 seconds
writing to: D:\PROGRA~1\EAGAME~1\MOHAA\mainta\configs\unnamedsoldier.cfg
SV packet loopback : connect
SVC_DirectConnect ()
>>>\challenge\0\qport\34778\protocol\17\name\[Spec Ops] Jack Ruby\rate\25000\dm_playergermanmodel\german_waffenss_shutze\dm_playermodel\american_ranger\snaps\20<<<
version 17 connecting to 17
Going from CS_FREE to CS_CONNECTED for [Spec Ops] Jack Ruby
CL packet loopback: connectResponse
[Spec Ops] Jack Ruby : dropped gamestate, resending
SV_SendClientGameState() for [Spec Ops] Jack Ruby
Going from CS_CONNECTED to CS_PRIMED for [Spec Ops] Jack Ruby
Called FadeSound with: 0.000000
------- Sound Begin Registration -------
------- S_StopAllSounds (stop music) -------
------- S_StopAllSounds Complete-------
------- Sound Begin Registration Complete -------
LoadLibrary (mainta/cgamex86.dll)

------------------
Event system initialized: 7 classes 144 events 4032 total memory in response list

CM_LoadMap( maps/obj/mp_peenemunde_tow.bsp, 1 )


-----------PARSING 'uberdialog.scr'------------
Any SetCurrentTiki errors means that tiki wasn't prefetched and tiki-specific sounds for it won't work. To fix prefetch the tiki. Ignore if you don't use that tiki on this level.
CG_Command_ProcessFile: ubersound/uberdialog.scr
Parse/Load time: 0.577000 seconds.
-------------PARSING 'uberdialog.scr' DONE---------------



-----------PARSING 'ubersound.scr'------------
Any SetCurrentTiki errors means that tiki wasn't prefetched and tiki-specific sounds for it won't work. To fix prefetch the tiki. Ignore if you don't use that tiki on this level.
CG_Command_ProcessFile: ubersound/ubersound.scr
Parse/Load time: 8.975000 seconds.
-------------PARSING 'ubersound.scr' DONE---------------

stitched 0 LoD cracks
...loaded 15600 faces, 422 meshes, 0 trisurfs, 0 flares
R_LevelMarksLoad: maps/obj/mp_peenemunde_tow.dcl not found
Loading Special Effects...
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_paper_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_paper_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_wood_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_wood_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_metal_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_metal_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_stone_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_stone_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_dirt_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_dirt_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_grass_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_grass_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_mud_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_mud_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_water_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_water_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_glass_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_glass_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_sand_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_sand_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_foliage_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_foliage_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_snow_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_snow_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_carpet_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_carpet_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_human_uniform_lite.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bh_human_uniform_hard.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/water_trail_bubble.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_base.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bazookaexp_base.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/heavyshellexp_base.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/tankexp_base.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_paper.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_wood.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_metal.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_stone.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_dirt.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_grass.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_mud.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_water.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_gravel.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_sand.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_foliage.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_snow.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/grenexp_carpet.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/heavyshellexp_dirt.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/heavyshellexp_stone.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/heavyshellexp_snow.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/tankexp_dirt.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/tankexp_stone.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/tankexp_snow.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bazookaexp_dirt.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bazookaexp_stone.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/bazookaexp_snow.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/water_ripple_still.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/water_ripple_moving.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/barrel_oil_leak_big.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/barrel_oil_leak_medium.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/barrel_oil_leak_small.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/barrel_oil_leak_splat.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/barrel_water_leak_big.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/barrel_water_leak_medium.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/barrel_water_leak_small.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/barrel_water_leak_splat.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/fs_light_dust.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/fs_heavy_dust.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/fs_dirt.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/fs_grass.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/fs_mud.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/fs_puddle.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/fs_sand.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/fs_snow.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/fx/fx_fence_wood.tik
------- Sound End Registration -------
------- Sound End Registration Complete -------
CL_EndRegistration: 0.32 seconds
CL_InitCGame: 27.67 seconds
Going from CS_PRIMED to CS_ACTIVE for [Spec Ops] Jack Ruby
^~^~^ Add the following line to the *_precache.scr map script:
cache models/player/american_ranger.tik
Called FadeSound with: 0.000000
[Spec Ops] Jack Ruby has entered the battle
MUSIC: changing from [ none | none ] to [ normal | normal ]
^~^~^ Add the following line to the *_precache.scr map script:
cache models/player/american_ranger_fps.tik
WARNING: reused image textures/sprites/dustdrop.tga with mixed picmip value
^~^~^ Add the following line to the *_precache.scr map script:
cache models/player/german_waffenss_shutze.tik
LOCALIZATION ERROR: 'NPCS: Allies 0(0) Axis 0(0)' does not have a localization entry
[Spec Ops] Jack Ruby has joined the Allies
^~^~^ Add the following line to the *_precache.scr map script:
cache models/weapons/thompsonsmg.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/weapons/m2frag_grenade.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/weapons/m18_smoke_grenade.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/weapons/colt45.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/items/binoculars.tik
WARNING: reused image models/fx/muzflash/flashnode1.tga with mixed picmip value
WARNING: reused image textures/effects/stonechip.tga with mixed picmip value
WARNING: reused image textures/sprites/corona_util.tga with mixed picmip value
WARNING: reused image textures/effects/metalspark.tga with mixed picmip value
^~^~^ Add the following line to the *_precache.scr map script:
cache models/ammo/thompson_clip.tik

Disconnected from server
----- Server Shutdown -----
[/color]

Here's the script that I have in my .SCR

//the whole script
//you can just stick this whole script in

main:
level.script="maps/obj/MP_peenemunde_TOW.scr"
exec global/tow_dm.scr
exec global/ambient.scr m5l1b

level.gametype = int( getcvar( g_gametype ) )
//gametype 5 = Tug of War
if( level.gametype == 5 )
{
setcvar "g_obj_alliedtext1" "Protect Spawn Point"
setcvar "g_obj_alliedtext2" "Disable the factory electricity"
setcvar "g_obj_alliedtext3" "Disable the fuel pumps"
setcvar "g_obj_alliedtext4" "Disable the tracking radar"
setcvar "g_obj_alliedtext5" "Detonate Axis Spawn Point"

setcvar "g_obj_axistext1" "Protect Spawn Point"
setcvar "g_obj_axistext2" "Connect the factory electricity"
setcvar "g_obj_axistext3" "Turn on the fuel pumps"
setcvar "g_obj_axistext4" "Enable the tracking radar"
setcvar "g_obj_axistext5" "Destroy Allied Spawn Point"
}
else
{
//Not a TOW game remove the bombs
$allie_bomb remove
$axis_bomb remove

// set scoreboard messages
setcvar "g_obj_alliedtext1" "Peenemunde"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Peenemunde"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
}
//////////////////////////
level waittill prespawn
//////////////////////////

//////////////////////////
level waittill spawn
//////////////////////////

level.bRoundStarted = 0
level.axisFire = 1

// set the parameters for this round based match
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 15 // round time limit in minutes
level.clockside = draw // set to axis, allies, kills, or draw
level.nuggetsObjectives = 3 // Number of objectives needed to

//////////////////////////
level waittill roundstart
//////////////////////////

//If this is a tug of war game then we init all the TOW stuff
if( level.gametype == 5 )
{
//init the objectives
thread init_objectives
thread init_spawner_bombs
thread init_switch_lights

//Setup the starting team objectives
thread set_objectives
level.bRoundStarted = 1
}

level.numObjectives = 0 //no objectives completed
level.switch1owner = 0 //0 meaning neutral
level.switch2owner = 0
level.switch3owner = 0
end

///////////////////
// the switches //
///////////////////

switch1:
if ( level.bRoundStarted == 1 )
{
if ( parm.other.dmteam == axis )
{
if ( level.switch1owner == 1 ) || ( level.switch1owner == 0 ) //1 meaning allies //0 meaning neutral
{
$obj2_light_allie hide
$obj2_light_axis show
iprintln "The Axis turned on the factory electricity!"
level.switch1owner = -1
}
}
else
if ( parm.other.dmteam == allies )
{
if ( level.switch1owner == -1 ) || ( level.switch1owner == 0 ) //-1 meaning axis
{
$obj2_light_axis hide
$obj2_light_allie show
iprintln "The Allies turned off the factory electricity!!"
level.switch1owner = 1
}
}
//Update team current objectives
waitthread Check_End_Match
}end

switch2:
if ( level.bRoundStarted == 1 )
{
if ( parm.other.dmteam == axis )
{
if ( level.switch2owner == 1 ) || ( level.switch2owner == 0 )
{
$obj3_light_allie hide
$obj3_light_axis show
iprintln "The Axis turned on the factory electricity!"
level.switch2owner = -1
}
}
else
if ( parm.other.dmteam == allies )
{
if ( level.switch2owner == -1 ) || ( level.switch2owner == 0 )
{
$obj2_light_axis hide
$obj2_light_allie show
iprintln "The Allies turned off the factory electricity!!"
level.switch2owner = 1
}
}
//Update team current objectives
waitthread Check_End_Match
}end

switch3:
if ( level.bRoundStarted == 1 )
{
if ( parm.other.dmteam == axis )
{
if ( level.switch3owner == 1 ) || ( level.switch3owner == 0 )
{
$obj3_light_allie hide
$obj3_light_axis show
iprintln "The Axis turned on the factory electricity!"
level.switch3owner = -1
}
}
else
if ( parm.other.dmteam == allies )
{
if ( level.switch3owner == -1 ) || ( level.switch3owner == 0 ) //-1 meaning axis
{
$obj4_light_axis hide
$obj4_light_allie show
iprintln "The Allies turned off the factory electricity!!"
level.switch3owner = 1
}
}
//Update team current objectives
waitthread Check_End_Match
}end

/////////////////////
// objective check //
/////////////////////

Check_End_Match:
level.nuggetsObjectives = ( level.switch1owner + level.switch2owner + level.switch3owner )
//will do complete check
iprintlnbold "what's the magic number" evel.nuggetsObjectives //if this never reaches 3 or -3 then i have a few more problems
if ( level.nuggetsObjectives == 3 ) //meaning allies have reached all their objectives
{
//ignore the clock
level ignoreclock 1

//if there is a bomb ticking stop it.
waitthread global/tow_dm.scr::StopBomb

//Allies win play the movie
teamwin allies
}
if ( level.nuggetsObjectives == -3 ) //meaning axis have reached all their objectives
{
level ignoreclock 1
waitthread global/tow_dm.scr::StopBomb
teamwin axis
}
thread whats_left //i've added this to show on screen the remaining objectives
end

/////////////////
// what's left //
/////////////////

whats_left:

if ( switch1owner == -1 )
{ iprintlnbold_noloc "for you to edit" } //1 owned by axis
else
{ if ( switch1owner == 0 )
{ iprintlnbold_noloc "for you to edit" } //1 still neutral
else
{ if ( switch1owner == 1 )
{iprintlnbold_noloc ""for you to edit" } //1 owned by allies
}}
if ( switch2owner == -1 )
{ iprintlnbold_noloc "for you to edit" } //2 owned by axis
else
{ if ( switch2owner == 0 )
{ iprintlnbold_noloc "for you to edit" } //2 still neutral
else
{ if ( switch2owner == 1 )
{iprintlnbold_noloc ""for you to edit" } //2 owned by allies
}}
if ( switch3owner == -1 )
{ iprintlnbold_noloc "for you to edit" } //3 owned by axis
else
{ if ( switch3owner == 0 )
{ iprintlnbold_noloc "for you to edit" } //3 still neutral
else
{ if ( switch3owner == 1 )
{iprintlnbold_noloc ""for you to edit" } //3 owned by allies
}}

////////////////////
// who's got what // won't work!!!
////////////////////
/*
set_objectives:

//First lets do the allies
if( $Obj_switch3.ControlledBy == 0 )
{
$Obj_switch3 SetCurrent 1
}
else if( $Obj_switch2.ControlledBy == 0 )
{
$Obj_switch2 SetCurrent 1
}
else if( $Obj_switch1.ControlledBy == 0 )
{
$Obj_switch1 SetCurrent 1
}
else if( $Obj_axisspawnpoint.ControlledBy == 0 )
{
$Obj_axisspawnpoint SetCurrent 1
}

//Now the Axis
if( $Obj_switch1.ControlledBy == 1 )
{
$Obj_switch1 SetCurrent 0
}
else if( $Obj_switch2.ControlledBy == 1 )
{
$Obj_switch2 SetCurrent 0
}
else if( $Obj_switch3.ControlledBy == 1 )
{
$Obj_switch3 SetCurrent 0
}
else if( $Obj_alliespawnpoint.ControlledBy == 1 )
{
$Obj_alliespawnpoint SetCurrent 0
}
end

////////////////////////////
// init the spawner bombs //
////////////////////////////

init_spawner_bombs:
//Allied spawner bomb
$axis_bomb thread global/tow_dm.scr::bomb_thinker "axis" maps/obj/MP_Tutorial_TOW.scr::alliesspawnpoint
$allie_bomb thread global/tow_dm.scr::bomb_thinker "allies" maps/obj/MP_Tutorial_TOW.scr::axisspawnpoint
end

//////////////////////
// hides the lights //
//////////////////////

init_switch_lights:
$obj2_light_allie hide
$obj2_light_axis hide
$obj3_light_allie hide
$obj3_light_axis hide
$obj4_light_allie hide
$obj4_light_axis hide
end

//-----------------------------------------------
// Blow up Allies Spawner
//-----------------------------------------------
axis_bomb_relay_explode:
self waittill trigger
iprintln "The Axis Spawn Point has been Destroyed!"
iprintln "The Axis Team Can No Longer Respawn!"
$Obj_alliesspawnpoint TakeOver 1
end

//-----------------------------------------------
// Blow up Axis Spawner
//-----------------------------------------------
allie_bomb_relay_explode:
self waittill trigger
iprintln "The Allies Spawn Point has been Destroyed!"
iprintln "The Allies Team Can No Longer Respawn!"
$Obj_axisspawnpoint TakeOver 0
end



Heres a link to the latest .PK3 http://www.westmount.co.uk/simons/User- ... cility.pk3

Would you mind taking a look, or JV, ROX anyone, would any of you mind taking a look if Nuggets does not have a copy of spearhead ?

I need to get this finished, I have been adding to the sctructures but the script is the only problem I am having, as soon as that works I will tweak the map and release it, I think it will play really well but will need at least 5-6 on each team to play well.

All your help is mucho apreciated,
Cheers

Jack
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

hmmm... yes!!! i need spearhead, i'll c if i can get my hands on a copy tomorrow, otherwise if you send me the .map file i'll try it that way...

until then... hmmm...
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

Heres a link to the zipped .Map
Theres a couple of Mortars and portable MG42's in there so I am not sure if it will cause you problems when you try to open it, let me know

http://mysite.freeserve.com/mohaastuff/ ... de_map.zip

Jack
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

I dled it. :wink:
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

Rox, in one of the posts above there is the .pk3 that I am trying to make work, any ideas whats going wrong with it ?

Jack
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

I have good and bad news, which 1st?

Bad news then:

there's an error in your script, with bad token "||". Try fixing that prob.

Good news:

I can run the map, it doesn't crash. Try to remove any maps in your mainta\maps\obj folder before trying the pk3.
Live to map, not map to live.
-mohaa_rox, .map
moderator
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

if ( level.switch3owner == -1 ) || ( level.switch3owner == 0 ) //-1 meaning axis

should be

if ( level.switch3owner == -1 || level.switch3owner == 0 ) //-1 meaning axis
Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

double brackets would be nicer :P

if ( level.switch3owner == -1 ) || ( level.switch3owner == 0 ) //-1 meaning axis

should be

if ( level.switch3owner == -1 || level.switch3owner == 0 ) //-1 meaning axis

and then should be

if (( level.switch3owner == -1 ) || ( level.switch3owner == 0 )) //-1 meaning axis :D
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

Cool, so heres a new error from the logfile, any ideas ?

bad token:
TOKEN_LOGICAL_OR:
||

if ( level.switch1owner == 1 ) || ( level.switch1owner == 0 ) //1 meaning allies //0 meaning neutral (maps/obj/mp_peenemunde_tow.scr, 88)
if ( level.switch1owner == 1 ) ^

^~^~^ Script file compile error: Couldn't parse 'maps/obj/mp_peenemunde_tow.scr'
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

Any chance you could fix that thing in the script and put the whole thing here again so I can paste the whole thing in again, I am just not happy when I am messing with the script myself, I get worried about doing it wrong.

Cheers mate
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

OK :D here it comes, hope it works this time though, there's bits you will still need 2 edit though, i'll do them in hmmm.... what colours we got??? cyan :D

//the whole script
//you can just stick this whole script in

main:
level.script="maps/obj/MP_peenemunde_TOW.scr"
exec global/tow_dm.scr
exec global/ambient.scr m5l1b

level.gametype = int( getcvar( g_gametype ) )
//gametype 5 = Tug of War
if( level.gametype == 5 )
{
setcvar "g_obj_alliedtext1" "Protect Spawn Point"
setcvar "g_obj_alliedtext2" "Disable the factory electricity"
setcvar "g_obj_alliedtext3" "Disable the fuel pumps"
setcvar "g_obj_alliedtext4" "Disable the tracking radar"
setcvar "g_obj_alliedtext5" "Detonate Axis Spawn Point"

setcvar "g_obj_axistext1" "Protect Spawn Point"
setcvar "g_obj_axistext2" "Connect the factory electricity"
setcvar "g_obj_axistext3" "Turn on the fuel pumps"
setcvar "g_obj_axistext4" "Enable the tracking radar"
setcvar "g_obj_axistext5" "Destroy Allied Spawn Point"
}
else
{
//Not a TOW game remove the bombs
$allie_bomb remove
$axis_bomb remove

// set scoreboard messages
setcvar "g_obj_alliedtext1" "Peenemunde"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" "Peenemunde"
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
}
//////////////////////////
level waittill prespawn
//////////////////////////

//////////////////////////
level waittill spawn
//////////////////////////

level.bRoundStarted = 0
level.axisFire = 1

// set the parameters for this round based match
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 15 // round time limit in minutes
level.clockside = draw // set to axis, allies, kills, or draw
level.nuggetsObjectives = 3 // Number of objectives needed to

//////////////////////////
level waittill roundstart
//////////////////////////

//If this is a tug of war game then we init all the TOW stuff
if( level.gametype == 5 )
{
//init the objectives
thread init_objectives
thread init_spawner_bombs
thread init_switch_lights

//Setup the starting team objectives
thread set_objectives
level.bRoundStarted = 1
}

level.numObjectives = 0 //no objectives completed
level.switch1owner = 0 //0 meaning neutral
level.switch2owner = 0
level.switch3owner = 0
end

///////////////////
// the switches //
///////////////////

switch1:
if ( level.bRoundStarted == 1 )
{
if ( parm.other.dmteam == axis )
{
if (( level.switch1owner == 1 ) || ( level.switch1owner == 0 )) //1 meaning allies //0 meaning neutral
{
$obj2_light_allie hide
$obj2_light_axis show
iprintln "The Axis turned on the factory electricity!"
level.switch1owner = -1
}
}
else
if ( parm.other.dmteam == allies )
{
if (( level.switch1owner == -1 ) || ( level.switch1owner == 0 )) //-1 meaning axis
{
$obj2_light_axis hide
$obj2_light_allie show
iprintln "The Allies turned off the factory electricity!!"
level.switch1owner = 1
}
}
//Update team current objectives
waitthread Check_End_Match
}end

switch2:
if ( level.bRoundStarted == 1 )
{
if ( parm.other.dmteam == axis )
{
if (( level.switch2owner == 1 ) || ( level.switch2owner == 0 ))
{
$obj3_light_allie hide
$obj3_light_axis show
iprintln "The Axis turned on the factory electricity!"
level.switch2owner = -1
}
}
else
if ( parm.other.dmteam == allies )
{
if (( level.switch2owner == -1 ) || ( level.switch2owner == 0 ))
{
$obj2_light_axis hide
$obj2_light_allie show
iprintln "The Allies turned off the factory electricity!!"
level.switch2owner = 1
}
}
//Update team current objectives
waitthread Check_End_Match
}end

switch3:
if ( level.bRoundStarted == 1 )
{
if ( parm.other.dmteam == axis )
{
if (( level.switch3owner == 1 ) || ( level.switch3owner == 0 ))
{
$obj3_light_allie hide
$obj3_light_axis show
iprintln "The Axis turned on the factory electricity!"
level.switch3owner = -1
}
}
else
if ( parm.other.dmteam == allies )
{
if (( level.switch3owner == -1 ) || ( level.switch3owner == 0 )) //-1 meaning axis
{
$obj4_light_axis hide
$obj4_light_allie show
iprintln "The Allies turned off the factory electricity!!"
level.switch3owner = 1
}
}
//Update team current objectives
waitthread Check_End_Match
}end

/////////////////////
// objective check //
/////////////////////

Check_End_Match:
level.nuggetsObjectives = ( level.switch1owner + level.switch2owner + level.switch3owner )
//will do complete check
iprintlnbold "what's the magic number" evel.nuggetsObjectives //if this never reaches 3 or -3 then i have a few more problems
if ( level.nuggetsObjectives == 3 ) //meaning allies have reached all their objectives
{
//ignore the clock
level ignoreclock 1

//if there is a bomb ticking stop it.
waitthread global/tow_dm.scr::StopBomb

//Allies win play the movie
teamwin allies
}
if ( level.nuggetsObjectives == -3 ) //meaning axis have reached all their objectives
{
level ignoreclock 1
waitthread global/tow_dm.scr::StopBomb
teamwin axis
}
thread whats_left //i've added this to show on screen the remaining objectives
end

/////////////////
// what's left //
/////////////////

whats_left:

if ( switch1owner == -1 )
{ iprintlnbold_noloc "
for you to edit" } //1 owned by axis //9 to edit in total VVV
else
{ if ( switch1owner == 0 )
{ iprintlnbold_noloc "for you to edit" } //1 still neutral
else
{ if ( switch1owner == 1 )
{iprintlnbold_noloc ""for you to edit" } //1 owned by allies
}}
if ( switch2owner == -1 )
{ iprintlnbold_noloc "for you to edit" } //2 owned by axis
else
{ if ( switch2owner == 0 )
{ iprintlnbold_noloc "for you to edit" } //2 still neutral
else
{ if ( switch2owner == 1 )
{iprintlnbold_noloc ""for you to edit" } //2 owned by allies
}}
if ( switch3owner == -1 )
{ iprintlnbold_noloc "for you to edit" } //3 owned by axis
else
{ if ( switch3owner == 0 )
{ iprintlnbold_noloc "for you to edit" } //3 still neutral
else
{ if ( switch3owner == 1 )
{iprintlnbold_noloc ""for you to edit" } //3 owned by allies
}}

////////////////////
// who's got what // won't work!!!
////////////////////
/*
set_objectives:

//First lets do the allies
if( $Obj_switch3.ControlledBy == 0 )
{
$Obj_switch3 SetCurrent 1
}
else if( $Obj_switch2.ControlledBy == 0 )
{
$Obj_switch2 SetCurrent 1
}
else if( $Obj_switch1.ControlledBy == 0 )
{
$Obj_switch1 SetCurrent 1
}
else if( $Obj_axisspawnpoint.ControlledBy == 0 )
{
$Obj_axisspawnpoint SetCurrent 1
}

//Now the Axis
if( $Obj_switch1.ControlledBy == 1 )
{
$Obj_switch1 SetCurrent 0
}
else if( $Obj_switch2.ControlledBy == 1 )
{
$Obj_switch2 SetCurrent 0
}
else if( $Obj_switch3.ControlledBy == 1 )
{
$Obj_switch3 SetCurrent 0
}
else if( $Obj_alliespawnpoint.ControlledBy == 1 )
{
$Obj_alliespawnpoint SetCurrent 0
}
end

////////////////////////////
// init the spawner bombs //
////////////////////////////

init_spawner_bombs:
//Allied spawner bomb
$axis_bomb thread global/tow_dm.scr::bomb_thinker "axis" maps/obj/MP_Tutorial_TOW.scr::alliesspawnpoint
$allie_bomb thread global/tow_dm.scr::bomb_thinker "allies" maps/obj/MP_Tutorial_TOW.scr::axisspawnpoint
end

//////////////////////
// hides the lights //
//////////////////////

init_switch_lights:
$obj2_light_allie hide
$obj2_light_axis hide
$obj3_light_allie hide
$obj3_light_axis hide
$obj4_light_allie hide
$obj4_light_axis hide
end

//-----------------------------------------------
// Blow up Allies Spawner
//-----------------------------------------------
axis_bomb_relay_explode:
self waittill trigger
iprintln "The Axis Spawn Point has been Destroyed!"
iprintln "The Axis Team Can No Longer Respawn!"
$Obj_alliesspawnpoint TakeOver 1
end

//-----------------------------------------------
// Blow up Axis Spawner
//-----------------------------------------------
allie_bomb_relay_explode:
self waittill trigger
iprintln "The Allies Spawn Point has been Destroyed!"
iprintln "The Allies Team Can No Longer Respawn!"
$Obj_axisspawnpoint TakeOver 0
end


//good luck
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

Hmm, nearly there, this is the latest error

-------------------- Actual Spawning Entities Done ------------------ 773 ms
^~^~^ Add the following line to the *_precache.scr map script:
cache models/statweapons/p_granatwerfer_cannon.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/static/v2.tik
^~^~^ Add the following line to the *_precache.scr map script:
cache models/items/pulse_explosive.tik
unexpected end of file found in comment
end (maps/obj/mp_peenemunde_tow.scr, 310)
^

^~^~^ Script file compile error: Couldn't parse 'maps/obj/mp_peenemunde_tow.scr'
^~^~^ Game (Event: 'setthread', Object: 'TriggerUse') : Script 'maps/obj/mp_peenemunde_tow.scr' was not properly loaded

^~^~^ Game (Event: 'setthread', Object: 'TriggerUse') : Script 'maps/obj/mp_peenemunde_tow.scr' was not properly loaded

^~^~^ Game (Event: 'setthread', Object: 'TriggerUse') : Script 'maps/obj/mp_peenemunde_tow.scr' was not properly loaded

^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'
^~^~^ Game (Event: 'light', Object: 'Object') : Couldn't convert string to vector - malformed string '80'



I think thats the part that decribes where its aparantly found and unexpected end of file in comment, end , 310 ???????

It seems much closer, I notice none of the ambient background sound is played, is that cos the whole script crashes out ?

Thanks again in advance
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

1)Find and delete the end
2)Are you sure you had the setthread?
3)Dunno, but may not affect.
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

I have no idea where the end is or where it should be, setthread ? I cant script man !

Anyone have any ideas whats up ?

Jack
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
User avatar
Jack Ruby
General
Posts: 1443
Joined: Fri Feb 07, 2003 12:20 am
Location: london

Post by Jack Ruby »

Come on Nuggets man, we are so close to the end of it, whats with that error message I get posted above ?

Nice one
Philip II of Macedon sent a message to Sparta:
"If I win this war, you will be slaves forever."
The Spartan ephors sent back a one word reply: "If".
Post Reply