driving truck

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
dietje_schietje
Corporal
Posts: 29
Joined: Wed Nov 19, 2008 8:20 pm

driving truck

Post by dietje_schietje »

When i add in my map a driving truck i have a problem i can walk trought it. only not where there is a brush from script object that the truck is targeting. I found this in the original maps the script object so i maked it to.

my script file:
main:
exec global/ai.scr
exec global/loadout.scr maps/test_drivingtruck.scr

level waittill prespawn

level waittill spawn

level.script = "maps test_drivingtruck.scr"

thread drive

end

drive:
$opel1 setcollisionentity $opel1.target
$opel1.origin = $opel1start.origin
$opel1 show
exec global/spotlight.scr::corona $opel1 "light left"
exec global/spotlight.scr::corona $opel1 "light right"
$opel1 thread global/vehicles_thinkers.scr::enemy_truck_think 400 6 $opel1path


end
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Post by SilentAngel »

what's $opel1 is?! :?:
dietje_schietje
Corporal
Posts: 29
Joined: Wed Nov 19, 2008 8:20 pm

Post by dietje_schietje »

opel1 = the truck
opel1.target = what opel1 is targeting in this case the script object
opel1start.origin = where the truck will teleportate to
opel1path = the first info_vehicle point
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Post by SilentAngel »

well I already know that targetname are declared like this:
local.opel1.targetname = opel1
or
local.opel1 targetname opel1

so, even if I don't understeand what you are trying to do, I see that you didn't declare the target of $ operator... :wink:
dietje_schietje
Corporal
Posts: 29
Joined: Wed Nov 19, 2008 8:20 pm

Post by dietje_schietje »

i want when my truck drive i can't walk trough it, i tried some things but always i can walk trough it but not in the middle area. The place where i can't walk trough is where in radiant the blue box from the truck. The script object is something i tried from the original maps but it don't works.
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Post by SilentAngel »

well, If I understood, that's all you need:

Code: Select all

$oplel1 solid
Also you MUST have declared the tergetname before that!
remember to do it if it's already not declared!

you should be able do do that with rediant too..but I don't know how..I'm not a mapper, just a scripter! lol
dietje_schietje
Corporal
Posts: 29
Joined: Wed Nov 19, 2008 8:20 pm

Post by dietje_schietje »

it doesn't work i always can walk trough it but only not in the middle area from the truck.

my script:

Code: Select all

main:
exec global/ai.scr
exec global/loadout.scr maps/test_drivingtruck.scr 

level waittill prespawn

level waittill spawn

level.script = "maps test_drivingtruck.scr"

thread drive

end

drive:
local.opel1.targetname = opel1
$opel1 solid
$opel1 hide
wait 5
$opel1.origin = $opel1start.origin
$opel1 show
exec global/spotlight.scr::corona $opel1 "light left" 
exec global/spotlight.scr::corona $opel1 "light right"
$opel1 thread global/vehicles_thinkers.scr::enemy_truck_think 400 6 $opel1path	


end

could you send a script that works if you now one and maybe how i make it mohradiant?
Aprop
Major
Posts: 291
Joined: Mon Nov 17, 2008 3:40 pm

Post by Aprop »

Download spearhead SDK and copy truck collision from one of example maps...then set it in script, setcollisionentity.. and remove "truck solid" line!! Better never use it for vehs'..


btw what mean

Code: Select all

local.opel1.targetname = opel1 

..?
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Post by SilentAngel »

Never made vheic on maps so I'm not sure, but why solid doesn't works? I use it to spawn solid objects and worked everytime..
local.myobject.tergetname = name
is the same of local.object targetname name
..so you can use $name instead of local.object..isn't it?! well in this case if he use $opel1 he must have declared it before..of course the truck must be spawned with the name of local.opel1..
if he do not declare the target of the targetname then $ oper won't work at all!!
PS: what I said will be useless in case the $opel1 tn is one of these already existent, I mean something like $player or if $opel1 is set up in radiant! lol
Aprop
Major
Posts: 291
Joined: Mon Nov 17, 2008 3:40 pm

Post by Aprop »

Solid make trucks bounding box solid... setcollisionentity copy and bind the script objects to truck... yes, custom-shape script object that can be made from several brushes with diffrent textures, for truck cargo clip wood, for window glass clip, for metal metal clip etc

I know what local.myobject.tergetname = name makin, but it has non sense it dietie~~ script...
SilentAngel
Captain
Posts: 239
Joined: Wed Mar 12, 2008 8:27 pm

Post by SilentAngel »

custom-shape script object that can be made from several brushes with diffrent textures, for truck cargo clip wood, for window glass clip, for metal metal clip etc
humm I didn't inderstood it was custom..also I dunno if there's a stock one lol!
I know what local.myobject.tergetname = name makin, but it has non sense it dietie~~ script...
..so how can he use $ if it's not declared the tergetname?
Never found a targetname of a entity that was not declared with the targetname command..
dietje_schietje
Corporal
Posts: 29
Joined: Wed Nov 19, 2008 8:20 pm

Post by dietje_schietje »

So i must make brushes with clips and that will be my script object?
But i not really now the scripting part? I have give everything a targetname.
Aprop
Major
Posts: 291
Joined: Mon Nov 17, 2008 3:40 pm

Post by Aprop »

Download spearhead sdk, search the examples for truck collision entity (its probably in somethin called test_ai), select it, copy and place it somewhere on your map... and use the script

Code: Select all

main:
exec global/ai.scr

level waittill spawn 
wait 1
$opel1 setcollisionentity $<targetname_of_copied_collision> 
wait 1
$opel1 thread global/vehicles_thinkers.scr::enemy_truck_think 400 6 $opel1path   


end 
I assume you got vehicle/opeltruck targetnamed opel1 and info_vehiclepoint opel1path... <targetname_of_copied_collision> is targetname of collision copied from example...
Post Reply