Jump to content
The Dark Mod Forums

Question: I would like to throw Func_statics around


Bikerdude

Recommended Posts

I'm not entirely certain what you're trying to accomplish. Is this a poltergeist effect you're shooting for (OOoOOoooooOOOoohhh...a floating ChaaAAaaair...) ?

 

A func_shooter might work, but collisions don't work the same for projectiles as they do static models.

 

You could use an invisible func_mover that you control via scripts (moveToPosition) or via NURBS curves. And then bind the model to aforementioned func_mover. But even in that case, collisions with player and with other moveables won't behave the same (though they wouldn't necessarily have to).

 

You could also give the furniture a collision mesh and make it a moveable. You can use forcefields, then, to toss the moveable around.

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

Yeah an angry ghost to through something at the player or just throw to give the play a scare..

 

hmm all sound's complicated, how about a very fast moving func_mover inside a nodraw tube that pushes a projectile (a chair) out the end of the tube like a gun? could the move speed be made fast enought to eject the chair..? - I shall make a test map!

Link to comment
Share on other sites

You could use an invisible func_mover that you control via scripts (moveToPosition) or via NURBS curves. And then bind the model to aforementioned func_mover. But even in that case, collisions with player and with other moveables won't behave the same (though they wouldn't necessarily have to).

IIRC this is a good method. I read somewhere that when the object is at the end of the spline it continues with the same inertia, so you can use it as a launch pod so to speak. Don't know exactly how.

Link to comment
Share on other sites

You could also simply give a movable chair a velocity via a script function:

 

// Sets the current linear velocity of this entity in units per second. The linear velocity of
// a physics object is a vector that defines the translation of the center of mass in units per second.
scriptEvent	 void    setLinearVelocity( vector velocity );

// Sets the current angular velocity of this entity. The angular velocity of
// a physics object is a vector that passes through the center of mass. The
// direction of this vector defines the axis of rotation and the magnitude
// defines the rate of rotation about the axis in radians per second.
scriptEvent	 void    setAngularVelocity( vector velocity );

 

If you make that a small amount and let the script continously add it for say 20 frames, the moveable will speed up and then fly away:

 

float i = 0;
vector velocity = (0,0,0);
while (i < 20)
 {
 i += 1;
 $mychair.SetLinearVelocity( velocity);
 velocity_x += 0.1;
 velocity_y += 0.1;
 velocity_yz+= 0.05;
 }

 

Although it looks like that is difficult to control. (Adding a small impulse instead of setting the vector would definitely be a better script event but we don'thave that yet. Please file a tracker entry so it doesn't get forgotten)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 4 replies
×
×
  • Create New...