puff of smoke and falling beams

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

puff of smoke and falling beams

Post 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.
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post 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.
Admin .MAP Forums
Image
Head above heels.
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

yes

Post 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 !
*/

Last edited by tltrude on Sun Apr 04, 2004 9:41 am, edited 1 time in total.
Tom Trude,

Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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?
Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

oh also I seem to be missing func_fallingrock :? :(
Image
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post 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:
Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

thanks, I found the explosion I want, but now if I could get func_fallingrock, anyone else have this?
Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

ok nevermind I put in classname/func_fallingrock and viola! I think I have it working good now, thanks!
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

func_fallingrock

Post 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.
Tom Trude,

Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

ok, I got it in now, I just copied in another copy of entdefs and it's there.
Image
Post Reply