Repairing a mover / tank thingie


(Yatta) #1

Hello there

I have a tank in my map (actually 3 tanks, but thats because of scripts limits and the tank path is VERY long) and I just want to do a classic thingie : damageable/repairable tank.

What I have for now is a mover (the tank collision) with its models attached, a TOI arround it and everything works fine. Tank is owned by Axis and Allies can damage it so it stops, so far so good. But how do I allow Axis to repair the tank ?

Ive searched topics & stuff but I guess theres something I missed, I assume only constructible are buildable / repairable by an engineer, but If im not mistaken, if you attach a model to a constructible you cant ‘attachtotag’ stuff to it (had crashes with that), or a func_constructible cant move like a mover ?

So, to summarize, I need to have a clear view of what I need for a moving, damageable, repairable, no need for escort tank :

  • mover (metal clips) with model of tank wheels
  • models attached to the mover model (tank body, canon)
  • TOI arround the tank so it is visible on the map
  • script : using events death / rebirth of the mover to manage my stuff

should there be a func_constructible arround here ?

Thanks in advance : )


(-SSF-Sage) #2

Check at the goldrush. The toi has been linked to the func_const. which is nodrawn nonsolid dummy (add the origin too) cube. So the func_const. should have scriptname and targetname. It need to have two brushes, one with origin, and one with nondrawn nonsolid.


(Yatta) #3

Ok, so the list of ‘ingredients’ is as follow ?

  • mover (metal clips) with model of tank wheels
  • ** func_constructible nonsolid / nodraw **
  • models attached to the mover model (tank body, canon)
  • TOI arround the tank so it is visible on the map
  • script : using events death / rebirth of the ** func_constructible ** to manage my stuff

Should the constructible be attached to the mover or should it follow the path itself ?


(-SSF-Sage) #4

The toi is targeting to the const. so I think it doesn’t need to be attached. But I think you need more stuff there, check at the goldrush. If I remember right (don’t care to check, I’m on the lounch break) there were some tank_disabler and tank_enabler, to make the tank alive/dead. Haven’t done this, I’ve only done fully working tank, but I would suggest you to take a good look at the map and the script in goldrush, and to start cutting things out. Here is a good tutorial about how the tank works.


(Yatta) #5

Thanks alot for the answer, you shine the light on my mistake : Obviously its useless to move the func_const arround with the tank since its invisible and non-solid. @_@

The link helped too. As 2Bit said in his tutorial, its a hassle doing a tank from scratch … such a hassle its hard to find a tutorial on that (from scratch).

But now I have everything I need, thanks alots again :slight_smile:


(-SSF-Sage) #6

No problem! Did that mean you got it working? :slight_smile:


(Yatta) #7

Yup, works almost fine now, the tank can be damaged, but some stuff isnt triggered, like he dont actually stop, but thats a script and target matters and im confident it’ll be soon ok (it might even be fixed already, I didnt test my latest changes).

Thanks for the help, I think I can manage to get a version ready for another public test session arround this week end … its now very close to become a distributed beta map :slight_smile:

yay \o/