Collision entities
Moderator: Moderators
-
HUNTER--{A}--
- Corporal
- Posts: 25
- Joined: Sun Mar 09, 2003 2:19 am
Collision entities
I am having a problem getting a collision mask to follow my truck in the map I believe I am not setting up the setcollisionentity properly.
-
HkySk8r187
- Lance Corporal
- Posts: 20
- Joined: Fri Jun 28, 2002 6:37 pm
- Contact:
just make a new map, put in the model you want to have the collmap, put the model at the default angles and put the models origin at 0,0,0. Make your clip brushes however you want them, and save the map file with the same name as the model. Save it to the location with the rest of the collmaps of that type and everytime you use that model you'll have a collmap from that file. You wont need to change any settings or tell it to work, it automatically searches for the .map file that matches the model name and loads the collisions from it. Good luck.
I think he meant for a driving vehicle alsomohaa_rox wrote:Yes, maybe also try:
$truck.collisionent = $truck.target
Sets the collision mask. Only works for driveable vehicles, but hey! WHo knows? No harm trying?
-
HkySk8r187
- Lance Corporal
- Posts: 20
- Joined: Fri Jun 28, 2002 6:37 pm
- Contact:
Why do it that way? Then you have to make the collision brushes for each model you use and each map, just make a seperate map file for it and you're done, forever, everytime you use and model and in every map, and it doesn't need to be included in your pak, just make a collmap like 2015 did when they developed the game!
That will only work for static modelsHkySk8r187 wrote:Why do it that way? Then you have to make the collision brushes for each model you use and each map, just make a seperate map file for it and you're done, forever, everytime you use and model and in every map, and it doesn't need to be included in your pak, just make a collmap like 2015 did when they developed the game!
-
HkySk8r187
- Lance Corporal
- Posts: 20
- Joined: Fri Jun 28, 2002 6:37 pm
- Contact:
-
HUNTER--{A}--
- Corporal
- Posts: 25
- Joined: Sun Mar 09, 2003 2:19 am
It is for a truck that is following a oath around the map. I have made a clip that covers the truck the way I want (with an extension that makes it twice the hieght due to the following of the z axis). I have selected all the brushes in the clip and have made them a script object and have entered a value of targetname gtruckmask. The truck that I have that goes around the map is targetname gtruck I have also entred the following value on the truck Target gtruckmask. There is a line that connects the two together.
Is there anything else that I need to do in the map?
In the script I have entered the following: (this is where I believe my problem lies)
main:
exec global/ai.scr
exec global/exploder.scr
level waittill prespawn
exec global/thedock_precache.scr
level.script = maps/obj/thedock.scr
exec global/ambient.scr thedock
exec global/door_locked.scr::lock
setcvar "g_obj_alliedtext1" "Destroy the E-boat"
setcvar "g_obj_alliedtext2" "Destroy the Flak88"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" " Prevent Allies from"
setcvar "g_obj_axistext2" "destroying the boat"
setcvar "g_obj_axistext3" "and the Flak88"
setcvar "g_scoreboardpic" "Thedock"
thread fifisetup
thread random_explode_setup
level waittill spawn
level.bomb_damage = 300
level.bomb_explosion_radius = 1500
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 2
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 10 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
$gtruck thread drive_like_crazy $gtruck1
// level waittill roundstart
$gun_bomb thread global/obj_dm.scr::bomb_thinker
$flak88_explosive2 thread global/obj_dm.scr::bomb_thinker
$gtruck.collisionent = $gtruck.target
thread axis_win_timer $gun_bomb $flak88_explosive2
thread allies_win_bomb
end
drive_like_crazy local.path:
while(self)
{
self drive local.path 290 100 45 128
waitframe
self waittill drive
}
end
end
//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
axis_win_timer:
level waittill axiswin
end
//*** --------------------------------------------
//*** "Allies Victory"
//*** --------------------------------------------
allies_win_bomb:
while(level.targets_destroyed < 1)
waitframe
level.dmrespawning = 0
iprintlnbold "Allies destroyed a Target! Respawn has been disabled!"
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
end
I have left out the scripting for the random explosions and the attack dog that follow the above.
This map has 2 objectives 1. Blow up the flak88 2. Blow up the three guns on the e-boat. It has resawn until one of the objectives is complete. There is a truck that drives through the map. There is an attack dog that respawns to one of three different places. I want the collision mask to follow the truck.
Is there anything else that I need to do in the map?
In the script I have entered the following: (this is where I believe my problem lies)
main:
exec global/ai.scr
exec global/exploder.scr
level waittill prespawn
exec global/thedock_precache.scr
level.script = maps/obj/thedock.scr
exec global/ambient.scr thedock
exec global/door_locked.scr::lock
setcvar "g_obj_alliedtext1" "Destroy the E-boat"
setcvar "g_obj_alliedtext2" "Destroy the Flak88"
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" " Prevent Allies from"
setcvar "g_obj_axistext2" "destroying the boat"
setcvar "g_obj_axistext3" "and the Flak88"
setcvar "g_scoreboardpic" "Thedock"
thread fifisetup
thread random_explode_setup
level waittill spawn
level.bomb_damage = 300
level.bomb_explosion_radius = 1500
level.defusing_team = "axis"
level.planting_team = "allies"
level.targets_to_destroy = 2
level.dmrespawning = 1 // 1 or 0
level.dmroundlimit = 10 // round time limit in minutes
level.clockside = axis // set to axis, allies, kills, or draw
$gtruck thread drive_like_crazy $gtruck1
// level waittill roundstart
$gun_bomb thread global/obj_dm.scr::bomb_thinker
$flak88_explosive2 thread global/obj_dm.scr::bomb_thinker
$gtruck.collisionent = $gtruck.target
thread axis_win_timer $gun_bomb $flak88_explosive2
thread allies_win_bomb
end
drive_like_crazy local.path:
while(self)
{
self drive local.path 290 100 45 128
waitframe
self waittill drive
}
end
end
//*** --------------------------------------------
//*** "Axis Victory"
//*** --------------------------------------------
axis_win_timer:
level waittill axiswin
end
//*** --------------------------------------------
//*** "Allies Victory"
//*** --------------------------------------------
allies_win_bomb:
while(level.targets_destroyed < 1)
waitframe
level.dmrespawning = 0
iprintlnbold "Allies destroyed a Target! Respawn has been disabled!"
while(level.targets_destroyed < level.targets_to_destroy)
waitframe
teamwin allies
end
I have left out the scripting for the random explosions and the attack dog that follow the above.
This map has 2 objectives 1. Blow up the flak88 2. Blow up the three guns on the e-boat. It has resawn until one of the objectives is complete. There is a truck that drives through the map. There is an attack dog that respawns to one of three different places. I want the collision mask to follow the truck.
-
HUNTER--{A}--
- Corporal
- Posts: 25
- Joined: Sun Mar 09, 2003 2:19 am
-
HUNTER--{A}--
- Corporal
- Posts: 25
- Joined: Sun Mar 09, 2003 2:19 am
-
HUNTER--{A}--
- Corporal
- Posts: 25
- Joined: Sun Mar 09, 2003 2:19 am
Bind
If it is a script_object you can bind it to the truck:
level waittill prespawn
$gtruckmask bind $qtruck
It will stick to the truck like glue and you wont need all that collisionent stuff.
level waittill prespawn
$gtruckmask bind $qtruck
It will stick to the truck like glue and you wont need all that collisionent stuff.

