Past couple scripts havnt been working ~ PLZ HELP!
Moderator: Moderators
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
Past couple scripts havnt been working ~ PLZ HELP!
Here are all my targetnames and things like that. They are 100% exactly what I have entered into Radiant right down to the capitalization.
Script > Object
Key: targetname
Value: Fan1
Script > Object
Key: targetname
Value: Fan2
Script > Object
Key: targetname
Value: Fan3
Script > Object
Key: targetname
Value: Lift
Script > Object
Key: targetname
Value: Blast_Door
Trigger > Use
Key: targetname
Value: Fan_Start
Trigger > Use
Key: targetname
Value: Lift_Trigger
Trigger > Use
Key: targetname
Value: Blast_Door_Opener
Worldspawn
Key: ambientlight
Value: 70 70 70
-Key: suncolor
-Value: 70 70 70
--Key: script
--Value: HDL_Testing_Site.scr
Ok, now for my script: (sry if its a bit long but this problem is frustrating)
Main:
Thread Lift_Ops
$Lift time 3
Thread Blast_Door_Ops
$Blast_Door time 3
Thread Fan_Ops
$Fan1 time 5
$Fan2 time 2
$Fan3 time 2
Lift_Ops:
$Lift_Trigger waittill trigger
$Lift_Trigger nottriggerable
$Lift_Switch anim move
wait 3
$Lift loopsound Mec_ElevatorRun_01
$Lift moveup 504
waitmove
$Lift stoploopsound
wait 5
$Lift loopsound Mec_ElevatorRun_01
$Lift movedown 504
waitmove
$Lift stoploopsound
wait 3
$Lift_Trigger triggerable
$Lift_Switch anim move
goto Lift_Ops
end
Blast_Door_Ops:
$Blast_Door_Opener waittill trigger
$Blast_Door_Opener nottriggerable
$Blast_Door loopsound lighthouse_run
$Blast_Door moveup 80
waitmove
$Blast_Door stoploopsound
wait 5
$Blast_Door_Opener triggerable
$Blast_Door_Opener waittill trigger
$Blast_Door_Opener nottriggerable
$Blast_Door loopsound lighthouse_run
$Blast_Door movedown 80
waitmove
$Blast_Door stoploopsound
wait 5
Blast_Door_Opener triggerable
goto Blast_Door_Ops
end
Fan_Ops_Start:
$Fan_Start waittill trigger
$Fan_Start nottriggerable
wait 5
goto Fan_Ops
end
Fan_Ops:
iprintlnbold_noloc "Fans 2 and 3 comming online - please wait"
$Fan2 RotateY 360
$Fan3 RotateY 360
wait 3
$Fan2 RotateY 270
$Fan3 RotateY 270
wait 3
$Fan2 RotateY 180
$Fan3 RotateY 180
wait 3
$Fan2 RotateY 90
$Fan3 RotateY 90
iprintlnbold_noloc "Fans 2 and 3 online"
wait 5
iprintlnbold_noloc "Fan 1 comming online - please wait"
$Fan1 RotateX 360
wait 5
$Fan1 RotateX 315
wait 5
$Fan1 RotateX 270
wait 5
$Fan1 RotateX 225
wait 5
$Fan1 RotateX 180
wait 5
$Fan1 RotateX 135
wait 5
$Fan1 RotateX 90
wait 5
$Fan1 RotateX 45
iprintlnbold_noloc "Fan 1 online"
wait 5
$Fan_Start triggerable
$Fan_Start waittill trigger
wait 3
iprintlnbold_noloc "Fan 1 comming offline - please wait"
$Fan1 RotateX 90
wait 5
$Fan1 RotateX 135
wait 5
$Fan1 RotateX 180
wait 5
$Fan1 RotateX 225
wait 5
$Fan1 RotateX 270
wait 5
$Fan1 RotateX 315
wait 5
$Fan1 RotateX 360
wait 5
$Fan1 RotateX 0
iprintlnbold_noloc "Fan 1 offline"
wait 5
iprintlnbold_noloc "Fans 2 and 3 comming offline - please wait"
$Fan2 RotateY 180
$Fan3 RotateY 180
wait 3
$Fan2 RotateY 270
$Fan3 RotateY 270
wait 3
$Fan2 RotateY 360
$Fan3 RotateY 360
wait3
$Fan2 RotateY 0
$Fan3 RotateY 0
iprintlnbold_noloc "Fans 2 and 3 offline"
wait 5
goto Fan_Ops_Start
end
Map title: HDL_Testing_Site
Script title: HDL_Testing_Site.scr
.Map folder = main/maps/dm
.SCR folder = main/maps/dm
The Problem= Not one single scripted event happens when I press any of the triggers.
P.S. My clan name is now HDL and has been for quite some time, thougnt I'd just inform you of that irrelevant info... HDL = Home Defense Legion
Population: 3
Script > Object
Key: targetname
Value: Fan1
Script > Object
Key: targetname
Value: Fan2
Script > Object
Key: targetname
Value: Fan3
Script > Object
Key: targetname
Value: Lift
Script > Object
Key: targetname
Value: Blast_Door
Trigger > Use
Key: targetname
Value: Fan_Start
Trigger > Use
Key: targetname
Value: Lift_Trigger
Trigger > Use
Key: targetname
Value: Blast_Door_Opener
Worldspawn
Key: ambientlight
Value: 70 70 70
-Key: suncolor
-Value: 70 70 70
--Key: script
--Value: HDL_Testing_Site.scr
Ok, now for my script: (sry if its a bit long but this problem is frustrating)
Main:
Thread Lift_Ops
$Lift time 3
Thread Blast_Door_Ops
$Blast_Door time 3
Thread Fan_Ops
$Fan1 time 5
$Fan2 time 2
$Fan3 time 2
Lift_Ops:
$Lift_Trigger waittill trigger
$Lift_Trigger nottriggerable
$Lift_Switch anim move
wait 3
$Lift loopsound Mec_ElevatorRun_01
$Lift moveup 504
waitmove
$Lift stoploopsound
wait 5
$Lift loopsound Mec_ElevatorRun_01
$Lift movedown 504
waitmove
$Lift stoploopsound
wait 3
$Lift_Trigger triggerable
$Lift_Switch anim move
goto Lift_Ops
end
Blast_Door_Ops:
$Blast_Door_Opener waittill trigger
$Blast_Door_Opener nottriggerable
$Blast_Door loopsound lighthouse_run
$Blast_Door moveup 80
waitmove
$Blast_Door stoploopsound
wait 5
$Blast_Door_Opener triggerable
$Blast_Door_Opener waittill trigger
$Blast_Door_Opener nottriggerable
$Blast_Door loopsound lighthouse_run
$Blast_Door movedown 80
waitmove
$Blast_Door stoploopsound
wait 5
Blast_Door_Opener triggerable
goto Blast_Door_Ops
end
Fan_Ops_Start:
$Fan_Start waittill trigger
$Fan_Start nottriggerable
wait 5
goto Fan_Ops
end
Fan_Ops:
iprintlnbold_noloc "Fans 2 and 3 comming online - please wait"
$Fan2 RotateY 360
$Fan3 RotateY 360
wait 3
$Fan2 RotateY 270
$Fan3 RotateY 270
wait 3
$Fan2 RotateY 180
$Fan3 RotateY 180
wait 3
$Fan2 RotateY 90
$Fan3 RotateY 90
iprintlnbold_noloc "Fans 2 and 3 online"
wait 5
iprintlnbold_noloc "Fan 1 comming online - please wait"
$Fan1 RotateX 360
wait 5
$Fan1 RotateX 315
wait 5
$Fan1 RotateX 270
wait 5
$Fan1 RotateX 225
wait 5
$Fan1 RotateX 180
wait 5
$Fan1 RotateX 135
wait 5
$Fan1 RotateX 90
wait 5
$Fan1 RotateX 45
iprintlnbold_noloc "Fan 1 online"
wait 5
$Fan_Start triggerable
$Fan_Start waittill trigger
wait 3
iprintlnbold_noloc "Fan 1 comming offline - please wait"
$Fan1 RotateX 90
wait 5
$Fan1 RotateX 135
wait 5
$Fan1 RotateX 180
wait 5
$Fan1 RotateX 225
wait 5
$Fan1 RotateX 270
wait 5
$Fan1 RotateX 315
wait 5
$Fan1 RotateX 360
wait 5
$Fan1 RotateX 0
iprintlnbold_noloc "Fan 1 offline"
wait 5
iprintlnbold_noloc "Fans 2 and 3 comming offline - please wait"
$Fan2 RotateY 180
$Fan3 RotateY 180
wait 3
$Fan2 RotateY 270
$Fan3 RotateY 270
wait 3
$Fan2 RotateY 360
$Fan3 RotateY 360
wait3
$Fan2 RotateY 0
$Fan3 RotateY 0
iprintlnbold_noloc "Fans 2 and 3 offline"
wait 5
goto Fan_Ops_Start
end
Map title: HDL_Testing_Site
Script title: HDL_Testing_Site.scr
.Map folder = main/maps/dm
.SCR folder = main/maps/dm
The Problem= Not one single scripted event happens when I press any of the triggers.
P.S. My clan name is now HDL and has been for quite some time, thougnt I'd just inform you of that irrelevant info... HDL = Home Defense Legion
Population: 3
Last edited by HDL_CinC_Dragon on Mon Nov 15, 2004 9:43 pm, edited 1 time in total.
I think it's both.jv_map wrote:I voted 'no' because you didn't tell what the problem is(or I'm going blind
)
I read through it and it doesn't look like he stated what the problem is.
Wait a second, you are the almighty JV, you shouldn't have to know what the problem is. You should be able to spot it as soon as you see it! What's wrong with you!
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
ok, i put in the targetnames with the waitmoves, added an "end" under the last threading line. Testing---jv_map wrote:Ah found another one![]()
You shouldn't just type 'waitmove' but prefix the object you want the script to wait for, like '$Lift waitmove'.
Also I think you need an 'end' above Lift_Ops: but I'm still trying to find out where all the gotos refer to
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
-
Green Beret
- Major General
- Posts: 746
- Joined: Mon Apr 19, 2004 12:21 pm
- Contact:
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
that is very odd. I dont know why that would happene either. But in this particular map of mine I have no LOD terrain... I dont like LOD too much... dont know why. Unfortunatly i have to use it in one of the maps im making that based on a town from an online RPG called "Runescape" (http://www.runescape.com) but yeah. Thats pretty strange.
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
Script
Never use caps in scripting, it only cause problems with syntax. OK, if this script does not work, it is because you have different targetnames in the map, or the bsp and scr do not have the same name. The lift sound wont work because you have no workaround for that (singleplayer only) sound alias. Is the map MOHAA?
Worldspawn
Key: ambientlight
Value: 18 18 18
Key: suncolor
Value: 70 70 70
Key: script <------remove this key and value
Good luck!
Code: Select all
// HDL_Testing_Site
// ARCHITECTURE: [HDL]-{Gen} Dragon
// SCRIPTING: [HDL]-{Gen} Dragon
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "HDL Testing Site"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" ""
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
//exec global/door_locked.scr::lock //not used
level.script = maps/dm/HDL_Testing_Site.scr
exec global/ambient.scr mohdm7 // background sound (just wind)
$lift time 3
$blast_door time 3
$fan1 time 5 //this line is redundant
$fan2 time 2 //this line is redundant
$fan3 time 2 //this line is redundant
level waittill spawn
thread lift_ops
thread blast_door_ops
thread fan_ops_start
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
//level waittill roundstart //remove slash marks for final script
end
lift_ops:
$lift_trigger waittill trigger
$lift_trigger nottriggerable
$lift_switch playsound click
$lift_switch anim move
wait 3
$lift loopsound Mec_ElevatorRun_01 //this sound will not work in multiplayer without a workaround
$lift moveUp 504
$lift waitmove
$lift stoploopsound
wait 5
$lift loopsound Mec_ElevatorRun_01 //this sound will not work in multiplayer without a workaround
$lift moveDown 504
$lift waitmove
$lift stoploopsound
wait 3
$lift_Trigger triggerable
$lift_switch playsound click
$lift_switch anim idle
goto lift_ops
end
blast_door_ops:
$blast_door_opener waittill trigger
$blast_door_opener nottriggerable
$blast_door loopsound lighthouse_run
$blast_door moveup 80
$blast_door waitmove
$blast_door stoploopsound
wait 5
$blast_door_opener triggerable
$blast_door_opener waittill trigger
$blast_door_opener nottriggerable
$blast_door loopsound lighthouse_run
$blast_door movedown 80
$blast_door waitmove
$blast_door stoploopsound
wait 5
$blast_door_opener triggerable
goto blast_door_ops
end
fan_ops_start:
$fan_start waittill trigger //<--script waits here for trigger event
wait 5
iprintlnbold_noloc "Fans 2 and 3 comming online - please wait!"
$fan2 rotateY 360
$fan3 rotateY 360
wait 3
$fan2 rotateY 270
$fan3 rotateY 270
wait 3
$fan2 rotateY 180
$fan3 rotateY 180
wait 3
$fan2 rotateY 90
$fan3 rotateY 90
iprintlnbold_noloc "Fans 2 and 3 online!"
wait 5
iprintlnbold_noloc "Fan 1 comming online - please wait"
$fan1 rotateX 360
wait 5
$fan1 rotateX 315
wait 5
$fan1 rotateX 270
wait 5
$fan1 rotateX 225
wait 5
$fan1 rotateX 180
wait 5
$fan1 rotateX 135
wait 5
$fan1 rotateX 90
wait 5
$fan1 rotateX 45
iprintlnbold_noloc "Fan 1 online!"
wait 5
$fan_start waittill trigger //<--script waits here for trigger event
wait 3
iprintlnbold_noloc "Fan 1 going offline - please wait!"
$fan1 rotateX 90
wait 5
$fan1 rotateX 135
wait 5
$fan1 rotateX 180
wait 5
$fan1 rotateX 225
wait 5
$fan1 rotateX 270
wait 5
$fan1 rotateX 315
wait 5
$fan1 rotateX 360
wait 5
$fan1 rotateX 0
iprintlnbold_noloc "Fan 1 offline."
wait 5
iprintlnbold_noloc "Fans 2 and 3 going offline - please wait!"
$fan2 rotateY 180
$fan3 rotateY 180
wait 3
$fan2 rotateY 270
$fan3 rotateY 270
wait 3
$fan2 rotateY 360
$fan3 rotateY 360
wait3
$fan2 rotateY 0
$fan3 rotateY 0
iprintlnbold_noloc "Fans 2 and 3 offline."
goto fan_ops_start
end
Key: ambientlight
Value: 18 18 18
Key: suncolor
Value: 70 70 70
Key: script <------remove this key and value
Good luck!
Caps are for literature, not code =)
The best way to debug scripts that are compiling, but not functioning is to take it slowly step by step. Just take one instance of a technique you are trying to implement and see what it does... see if the trigger is pressed using message outputs... etc... eventualy you can then feel much more certain of where problems are, and ask more specific questions about how to resolve them. =)
The best way to debug scripts that are compiling, but not functioning is to take it slowly step by step. Just take one instance of a technique you are trying to implement and see what it does... see if the trigger is pressed using message outputs... etc... eventualy you can then feel much more certain of where problems are, and ask more specific questions about how to resolve them. =)
When I am king, you will be first against the wall~





