Jump to content

Scripting questions.


Recommended Posts

I will write here my questions about scripts, you can do it, too. And when someone who knows the answear comes here, he can write it down.

 

Here is my first one: Can I remove a brush?

 

I made it static and gave it a script_targetname. I used the remove command in the script, well it's still there, so I guess it can remove only entities.

 

I gonna write down the whole thing I want to do because I have other problems.

 

I put three boxes and a gas tank (which is made from 3 patches). I made the tank breakable, and when it breaks it supposed to fire the target_scriptrunner, which runs my script. The script is supposed to push a box far away, then remove it, remove two halves of the other two boxes and then start the fire effect.

It's working in some way... but I have problems. Actually when I go and see that part of the map I can see the tank is already destroyed. The fire is there, the flying away box is levitating in the air (but it went to the right place), and the two halves which are supposed to disappear are still there.

 

I thought I could make the boxes breakable, too. But I want only the tank can be blew up and that destroy the box halves.

Link to comment

wtf somehow I have to rewrite my post...

rem(texts here..)

+affect

move ($tag("ref_box1", ORIGIN$, <0 0 0>, 5000)

rotate (<180 90 45> , 500)

remove ("remove_box") //yes that's the actual name of it :P

use ("fire1") //fx file

wait (5000)

remove ("flying_box1")

 

I gonna try your idea soon, right now I am after some alarm sound :D

Link to comment
Here is my first one: Can I remove a brush?

 

I made it static and gave it a script_targetname. I used the remove command in the script, well it's still there, so I guess it can remove only entities.

a far simpler solution would be to make the brush into a func_usable and simply target it to toggle it on or off.

therfiles likes this
Link to comment

a far simpler solution would be to make the brush into a func_usable and simply target it to toggle it on or off.

I knew there was something more simple than i thought. (The fun part is I already used that somewhere)

 

 

EDIT: I've done it :D

I wonder about your opinion.

 

Edited by AradorasXeon
Link to comment

Looks great! Good thinking, Mug. That's a good solution.

 

I would try a more erratic path for the box and maybe some hurt triggers from the fire and or the blast. Maybe slighly less powerful....maybe you could even make it bounce with carefully timed move commands.

 

Yeah I was thinking on the erratic path, I may do that later. The fire does some damage, from the fx_runner itself, and in think the explosion should make more damage, because I wrote higher numbers for there, but maybe you're right and I will have to use trigger_hurts.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...