Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

I believe something like that has been done, but only for a static one. We have the option to project a camera view on a surface. If you use a teleporter on the moment the player gets close to that surface, you could simulate a portal. Having the ability to create portals like in "Portal" is a lot more difficult and will most likely require some serious coding.

EDIT: Here is the wiki page on how to set up the surface: https://wiki.thedarkmod.com/index.php?title=Security_Camera
Section "The Display Screen"

Edited by Destined
Link to comment
Share on other sites

One problem is that you would have two additional views, one for each portal, and as far as I remember the engine doesn't like that or isn't really setup for that. You could probably bypass this issue by using sort of a distorting effect at distance and only really render a view through the portal on closeup or by extending the specific pieces in the source code. The other issue is that you will not be able to get the connectiveness the portals in portal had. You can teleport the player or anything moveable once it touches the surface/gets close enough, but you cannot lean through it or say place an ai in it so that the legs are on your side of the portal while the upper body looks out on the other portal. I fairly doubt that this can be easely coded, as their is nothing comparable in the engine this could be build upon.

 

So all in all it is possible to mimic a similar behaviour, but nothing nearly as good and versatile as in portal. And as grayman noticed, the setup would require some work.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

4 hours ago, Obsttorte said:

I fairly doubt that this can be easely coded, as their is nothing comparable in the engine this could be build upon.

There is this

From this thread in 2014. Looks like the creator doesn't respond to messages though, at least back in 2014.

 

Link to comment
Share on other sites

14 minutes ago, AluminumHaste said:

That's quake 4 though.

I've checked beforehand, quake 4 seems to use idtech4 so it should be comparable?

Link to comment
Share on other sites

@Dragofer

If a camera was in an other room, and it stays in relatively the same position as the players head (getOrigin() and add distance in one direction to be in the other room). And you can make it "look" the same direction as the player (getViewAngles( )), you could have that video feed showing on a screen in the room where the player is, so he can see it.

 

Edited by STRUNK
Link to comment
Share on other sites

5 minutes ago, STRUNK said:

@Dragofer

If a camera was in an other room, and it stays in relatively the same position as the players head (getOrigin() and add distance in one direction to be in the other room). And you can make it "look" the same direction as the player (getRotation()?), you could have that video feed showing on a screen in the room where the player is, so he can see it.

Is it possible to "get" the looking angle of the player?

Obsttorte wrote a script based on the player's view angles (statues that only move when the player's not looking at them):

object statue_look
{
	void init();
	void loopLook();
	vector viewDir;
	vector direction;
	float cosine;
	float tolerance;
};
void statue_look::init()
{
	thread loopLook();
}
void statue_look::loopLook()
{
	while(1)
	{
		if (distanceTo($player1)<1024)
		{
			viewDir=sys.angToForward($player1.getViewAngles());
			direction=getOrigin()-$player1.getOrigin();
			cosine=viewDir*direction/sys.vecLength(direction);
			direction_z=0;
			if (cosine<sys.cos($player1.getFov()/2+30))
			{
				setAngles(sys.VecToAngles(-direction)+'0 90 0');
			}
		}
		sys.waitFrame();
	}
	
}

 

Link to comment
Share on other sites

I'm trying to recreate some sort of portal like in @Dragofer's post above and have a camera a target_null and a screen. I have the target_null moving relative (in an other room) to the players EyePos(ition) .. but it doesn't change the view. (have a visable cube bound to it to check if it it's indeed moving, and it is). When I place the target_null in a different place in DR, the view angle of the camera is different, so it seems to me it only checks whet the target_null is at gamestart, but doesn't update after that.

Is there a spawnarg that should be applied to have it update all the time, or do I have to take a different approach and ajust the camera view angle (rotation) with a script?

EDIT: Have the camera now looking around, but ofc. this doesn't work, for when you pan a camera, the straight horizontal lines get skewed on the screen : )

 

Edited by STRUNK
  • Like 1
Link to comment
Share on other sites

Playing with some mapping again and I have a basic question: When you group a set of entities, is it possible to enter that group and select / manipulate individual entries? I hate how whenever I need to change the position or a property on an entry in a group, I have to ungroup everything first then select it all again to group back.

Link to comment
Share on other sites

The camera approach to the "portal" doesn't seem to work in any way I can imagine. Even tried adding a mirror to point the camera at. Now I had an other idea: having a brush with portal_sky texture, you can see through a wall with that, to move over a wall relative to the players position but the problem is .. you can only see through the wall when it's still worldspawn, so it can't be moved by script ..

Does anyone know of an other glich that works when it's a func_mover ... or any other glich that might worth looking into?

Link to comment
Share on other sites

Thanks! So I have several questions about some less usual things I'm planning to do with a FM I'm working on... to avoid asking too much at once I'll post each one as it comes, this is the first effect I'm looking to toy with.

How do you make a group of AI's die when an objective is completed? Is there a trigger to set an NPC's health to zero? I'm interested to make sure that each affected character drops dead and becomes a ragdoll where they stand. Ideally crying out the death sound in case the player is within hearing range... don't care about blood particles. I'm hoping this can be achieved without pinning the death on the player too, so it doesn't appear as damage dealt in the stats at the end of the game while also not failing "don't kill anyone" objectives which are meant to fail only if the player attacks that AI normally.

For example: Let's say I have 4 guards guarding an entrance, and the goal is to steal a chalice from inside. Once the player has stolen the chalice and completed the main objective, I want the 4 guards to fall dead where they last stood, as a group of thieves spawn in the area (thematically they killed the guards).

Edited by MirceaKitsune
Link to comment
Share on other sites

I'm trying to get stopAnim( float channel, float frames ) to work, but I don't even have a clue about what the channel should be : D And when putting -1 as frames, is it never going to stop (endles number of frames)? The ragdoll is working, but they keep flopping around a bit : P

Other thing is, my approach would be scripting the event with becomeRagdoll and having the AI lay still. Simultaniously a death screem is triggered from speakers bound to the targeted guards. But I haven't got experience with AI in a map yet.

How would you approach this?

Edited by STRUNK
Link to comment
Share on other sites

43 minutes ago, STRUNK said:

@MirceaKitsune

I found this script event: BecomeRagdoll https://modwiki.dhewm3.org/BecomeRagdoll_(script_event)

If you are familliar with writing scripts you can try if that does what you want, otherwise I can try making a simple script for it.

I was hoping there's a trigger built into TDM for this, where I could target an NPC and make them fall dead. Didn't other FM's already do this? I recently replayed Exhumed... think one of the guards is killed by an objective there.

Link to comment
Share on other sites

  

10 minutes ago, grayman said:

$NPC_Name.kill();

Thanks! But how do you put that in a trigger? Is there a scripted trigger in DR that can be added to the map, to which I can then add that line?

3 minutes ago, STRUNK said:

@grayman

That would be it : D But how to have a finished objective trigger that? (I never did anything with objectives)

That too: How do you actually make completing an objective trigger something? I'm familiar with with say pressing a button to toggle a light, but how can completing an objective do it? I worked with objectives in the past but don't remember if I had to use triggers upon completing them before.

Link to comment
Share on other sites

You can trigger damage brushes, as an alternative...that would work if you know where the AI is going to be when they die.

  • Like 1
Link to comment
Share on other sites

40 minutes ago, STRUNK said:

@grayman

That would be it : D But how to have a finished objective trigger that? (I never did anything with objectives)

In your objective, fill in this field:

Completion Script: Kill_Bob

In your missionName.script file, insert "Kill_Bob()" just above the main() routine, like this:

void Kill_Bob()

{

     $Bob.kill();

}

void main()

{

}

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

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...