Page 1 of 1

puff of smoke and falling beams

Posted: Sat Apr 03, 2004 2:58 am
by blue60007
I can't seem to find what I want, what is the easiest way to create a cloud of dust with a couple beams falling and block the player's retreat after triggering a bomb?? Thanks.

Posted: Sat Apr 03, 2004 1:46 pm
by Bjarne BZR
You should be able to spawn these things and contril them from the script, but it will probably take you a while. But if you want it, you should be able to do it.

Posted: Sat Apr 03, 2004 2:28 pm
by blue60007
ok say I have a beam called beam1 and a script origin where I want it to go called beam1loc, so should I have this:

Code: Select all


$beam1 moveto $beam1loc
then I should insert a script model with model/fx/dummy.tik called dustemitter then:

Code: Select all

$dustemitter model emitters/tankdust.tik
or what?

yes

Posted: Sat Apr 03, 2004 2:48 pm
by tltrude
So far so good. But the dust emitter does not have to be a script_model. In the script you can stop/start the animation for it with this.

$dustemitter anim stop
$dustemitter anim start

$beam1 time 1.2 // travel time in seconds
$beam1 moveto $beam1loc
$beam1 move

If you want beam1 to bounce when it hits the ground, make it a "func_fallingrock". Then you would just need "$beam1 start" in the script to make it fall.

Code: Select all

/*QUAKED func_fallingrock (0.75 0.75 0.75) ?
Scorpios comments/information:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Description:
------------

A volume of falling rock.

Spawnflags:
===========

None !

Values:
=======

None !

Functions:
==========

"bounce" sent to entity when touched.
"dmg" ( Integer dmg ) Set the damage from the rock.
"doActivate" ( Entity activatingEntity ) General trigger event for all entities
"doTouch" ( Entity touchingEntity ) sent to entity when touched.
"noise" ( String sound ) Set the sound to play when the rock bounces
"rotate" rotates the falling rock.
"speed" ( Float speed ) Set the speed that the rock moves at.
"start" Starts rock falling.
"wait"( Float wait ) How long to wait before rock starts falling.

Internal Engine Use:
====================

None !

Not sure ?:
===========

None !
*/


Posted: Sat Apr 03, 2004 3:00 pm
by blue60007
ok sweet! thanks tom! I have the beam working but I'm still trying to get the dust. Actually what should I use for an explosion, I want an explosion then I'll have a couple beams fall and a wall fall over and lean up against the wall on the other side of the hallway. Also what are the other move commands? like rotatex 90 and so on?

Posted: Sat Apr 03, 2004 3:07 pm
by blue60007
oh also I seem to be missing func_fallingrock :? :(

Posted: Sat Apr 03, 2004 3:16 pm
by M&M
well,u could make a test map like i did and test all the effects in it .place all the effects u want then script them 2 turn on and off at different times while a visual indicator helps u understand when one is activated or not.i used a box to indicate when an effect is starting and stopping (move up move down).
after that choose the effect u like then place it in ur map :wink:

Posted: Sat Apr 03, 2004 3:20 pm
by blue60007
thanks, I found the explosion I want, but now if I could get func_fallingrock, anyone else have this?

Posted: Sat Apr 03, 2004 3:31 pm
by blue60007
ok nevermind I put in classname/func_fallingrock and viola! I think I have it working good now, thanks!

func_fallingrock

Posted: Sun Apr 04, 2004 9:32 am
by tltrude
If you want that func_fallingrock to be in the editor, copy the code from above (ends with "*/") to Notepad. and save it as "anyname.ccp" (rock.cpp maybe). Then place the file in main/code (make a code folder). The entdefs.pk3 has the same type files, but this one was not included. I'm still learning how to use the func_fallingrock. It will not bounce at an angle as far as I can tell. But, it does damage players, if that is set.

Here is a thread I used to test it falling into water. The thread just starts when the game does, and "$rock hide" is in prespawn.

Code: Select all

rock_hit:
	
	wait 20
	$rock show
	$rock start
	while !($rock istouching $water_hit_trigger) // waits until the rock touches the trigger.
	waitframe
	$water_hit_trigger playsound grenade_exp_water
	$water_hit anim start

end
"$water _hit" is an "animate/fx_mortar_water.tik" entity.

Posted: Sun Apr 04, 2004 2:47 pm
by blue60007
ok, I got it in now, I just copied in another copy of entdefs and it's there.