weird model placement


(WeeBull) #1

Here’s what I have managed to do.
I made a model of a flag which bobs up and down a bit and I wanted to use it as a capturable flag for a CTF map, but you can’t use animated models for that so I found another way of doing this. I have a team_ctf_redflag with the non-animated flag model and on the same place I have a misc_gamemodel with the animated flag. With scripting I setstate the flags invisible and default depending on which one needs to be shown. Normally the gamemodel is default and the redflag invisible, but when the player comes near it (when it steps into a trigger_multiple), the redflag is visible and the gamemodel is invisible so you can grab the flag. But I’ve got a problem with this. The team_ctf_redflag is always in the wrong place. When it becomes visible it’s half into the ground and no matter how high I place the little red team_ctf_redflag box in Radiant, it is always half into the ground. I’ve also changed the origin of the t_c_r manually, but nothing works, it’s always on the same place half into the ground. Anyone knows what’s wrong with this?

Ow I just got an idea, I’ll try to change the origin of the model in the modelling program. Hang on.

Edit:

OMG why didn’t I think of this before, it worked. I’ve been struggling with this for the past 3 days and now that I decided to ask here I finally found the answer…


(Flippy) #2

lol cool, ive been trying to do this aswell but didnt know it was impossible with team_CTF_redflag only…

but doesn’t it look weird when you step inside the trigger when the models change?


(WeeBull) #3

It did when it was placed wrong, it snapped to a completely different place, but now it just stops bobbing up and down and only snaps a little bit. And you probably won’t notice much of it anyway because it changes just before you try to get it.
If you want to know how I did it, I’ll be glad to explain it.


(Flippy) #4

i think i know how to do it…

im guessing you make the trigger_multiple target a target_script_trigger, setstate the actuall flag on and the bobbing flag off, and have it run a scriptblock by itself all the time… (keep triggering itself) but only when accum x is value y… if the target_script_trigger is not used( nobody in the trigger zone) accum x gets a different value which stops the self triggering which triggers something that setstates the bobbing model on and the actuall flag off…

or it might be one of my much too complicated scripts which work but are not really easy to understand :stuck_out_tongue:


(WeeBull) #5

Err…well yeah that might be possible, but I just put another trigger_multiple around the one that setstates the bobbing one invisible and the other flag default which targets a target_script_trigger to setstate it the other way around again. Much easier imo.