any mapper got time for putting in a moving truck?


(twt_thunder) #1

now i’ve tried this atleast 40 times… and it always ends sqrewing up…

i need help from someone who got time (now) to put in a truck that will be escortable from on side to the other of my map and when it reach the end … the allies win…
would be great with two or three barriers… i’ve tried the prefab generator on uje’s site but it seems like it f*** up the map file or the script somehow…

anyone up for the challenge?


(Destroy666) #2

What was wrong after using track from generator?
It should be ok if you put it correct in your map.


(Yatta) #3

If do it yourself from scratch you’ll understand how it works, and you’ll be able de debug it and maybe even do more funky scripts things on your map(s).

Iirc heres what you need … im not 100% sure so others are welcome to correct it :

In your map :

  • a script_mover made out of clips brushes with the same shape as your truck so your truck will be collidable, and an origin brush in the middle of it at ground level. Give it targetname and scriptname (like “truck_mover” for both keys). Give it a health key with a non-zero value. Flags : check Solid (so its collidable), ExplosiveDamage, Compass (show on map), resurrectable (so you can repair it), and axis or allies depending on the team owning it.

  • a trigger_objective_info arround that script_mover (actually you can put it somewhere else in the map since you will move it with the script). One big brush with a common/trigger shader and an origin brush in the middle, at ground level. This is used to indicate the game its an objective, and you can repair it and so on … Give it a targetname and a scriptname (“truck_toi”). Give it a the truck mover as a target (“truck_mover”). Give it a “track” key : “the Truck” - its mandatory and used to show “You are near …” messages. Give it a shortname : thats the name displayed on when hovering the mouse its icon on the command map ingame. Flags : Check either team objective flag it requires.

  • a func_trigger_multiple : this is used to detect nearby players so you can have your vehicule “escorted”. One big brush with a common/trigger shader and an origin brush in the middle, at ground level. Flags : Check either “axis_only” or “allies_only” depending on who is supposed to escort it. Give it a scriptname and targetname (like “truck_trigger”)

  • a series of info_train_spline_main entities to define its path. Each one must have a targetname, and target the next info_train_spline_main. Name them something like “sp_xxx” with xxx being the number of that node.

  • a target_script_trigger : an entity used to “hold” some script. targetname “truck_script”

Next thing, the script :

Explaining it is a little long, so ill do it only if you’re still actually interested in making it yourself.


(Ganjaman) #4

If you are using radiant 1.5 , there is a small bug when importing prefabs.

:confused:

It seems to re-number all the train_splines and,
add numbers to almost all script- / target -names of the prefab tank/truck.

So if you use 1.5 re-check all the names and numbers.
They have to be the same in radiant and in the script.

I hope it helps ! :cool:


(UJERebel) #5

Yea indeed… but this bug does not occur ( if i remember well) when you put te prefab in your map from in notepad


(twt_thunder) #6

[QUOTE=Yatta;260284]If do it yourself from scratch you’ll understand how it works, and you’ll be able de debug it and maybe even do more funky scripts things on your map(s).

Iirc heres what you need … im not 100% sure so others are welcome to correct it :

In your map :

  • a script_mover made out of clips brushes with the same shape as your truck so your truck will be collidable, and an origin brush in the middle of it at ground level. Give it targetname and scriptname (like “truck_mover” for both keys). Give it a health key with a non-zero value. Flags : check Solid (so its collidable), ExplosiveDamage, Compass (show on map), resurrectable (so you can repair it), and axis or allies depending on the team owning it.

  • a trigger_objective_info arround that script_mover (actually you can put it somewhere else in the map since you will move it with the script). One big brush with a common/trigger shader and an origin brush in the middle, at ground level. This is used to indicate the game its an objective, and you can repair it and so on … Give it a targetname and a scriptname (“truck_toi”). Give it a the truck mover as a target (“truck_mover”). Give it a “track” key : “the Truck” - its mandatory and used to show “You are near …” messages. Give it a shortname : thats the name displayed on when hovering the mouse its icon on the command map ingame. Flags : Check either team objective flag it requires.

  • a func_trigger_multiple : this is used to detect nearby players so you can have your vehicule “escorted”. One big brush with a common/trigger shader and an origin brush in the middle, at ground level. Flags : Check either “axis_only” or “allies_only” depending on who is supposed to escort it. Give it a scriptname and targetname (like “truck_trigger”)

  • a series of info_train_spline_main entities to define its path. Each one must have a targetname, and target the next info_train_spline_main. Name them something like “sp_xxx” with xxx being the number of that node.

  • a target_script_trigger : an entity used to “hold” some script. targetname “truck_script”

Next thing, the script :

Explaining it is a little long, so ill do it only if you’re still actually interested in making it yourself.[/QUOTE]

thanx but i am trying the prefab…it’s some work too but if they say it should work then…


(Tardis) #7

Just copy the one from Goldrush it works every time
and don’t forget the func_timer and change your target & targetname (s) so they match the script. :wink:
Just bare in mind the func_constructible for the Truck spawnflags = 533 even if it is axis or allied
has to be 533 don’t ask me why I don’t know why but it will not work otherwise .

If your still stuck send me a PM ;).


(Teuthis) #8

V[QUOTE=Tardis;546793]Just copy the one from Goldrush it works every time
and don’t forget the func_timer and change your target & targetname (s) so they match the script. :wink:
Just bare in mind the func_constructible for the Truck spawnflags = 533 even if it is axis or allied
has to be 533 don’t ask me why I don’t know why but it will not work otherwise .

If your still stuck send me a PM ;).[/QUOTE]

Dude, this post is 5 years old. Guess the truck is long officially released with a map :slight_smile:


(Tardis) #9

opps :o:o i did not see that well if any one else gets stuck they know what to do … :o