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

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 2 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • 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
×
×
  • Create New...