Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

To specifically fit your situation ...

 

if ( ( $player1.getObjectiveState(1) == 1 ) && ( $player1.getObjectiveState(6) == 1 ) &&
( ( $player1.getObjectiveState(2) == 1 ) || ( $player1.getObjectiveState(3) == 1 ) || ( $player1.getObjectiveState(4) == 1 ) ) )
{
 // the objectives have been met
}
else
{
 // the objectives haven't been met
}

 

Thanks grayman,

 

Will try this. Correct me if I'm wrong but this code should go befor the scepter call right?

 

void checkForScepter()

{

if ($player1.heldEntity() == $scepter)

{

sys.trigger($speaker_14); //play the sound

sys.trigger($speaker_13); //play the sound

sys.wait(2); //wait a while befor teleport, so the player can hear the sound

$player1.setOrigin($teleport1.getOrigin());

$player1.setAngles($teleport1.getAngles());

}

}

 

 

Oh disregard my comments in this post DOH!

 

I now realize the method.

Edited by Tr00pertj

Laptop:Metabox P370SM3- Intel Core i7-4800MQ- 2x GTX780M SLI- 16G 1600Mhz- 500G Samsung mSata-1TB Hitachi HDD- 120Hz LG 1080p.Desktops:i75930k-2x GTX980 SLI-16G 2133Mhz-Evo120GSSD-Swift PG278Q1440p Gsync.Spare:AMD A10-7850K-APU-8G 1866Mhz-seagate 4TB-120G ssd. LoL Old:P75-1:1FSB-8M ram 512MB Maxtor HDD-1MB Cirrus Logic video chip-still got the parts somewhere?First PC-Tandy 512K Color computer.

Link to comment
Share on other sites

IIRC, you're going to check for the scepter only if the objectives are met.

 

If that's correct, then you want it to look like this:

 

void checkForScepter()
{
 if ( ( $player1.getObjectiveState(1) == 1 ) && ( $player1.getObjectiveState(6) == 1 ) &&
	( ( $player1.getObjectiveState(2) == 1 ) || ( $player1.getObjectiveState(3) == 1 ) || ( $player1.getObjectiveState(4) == 1 ) ) )
 {
// the objectives have been met

if ($player1.heldEntity() == $scepter)
{
  sys.trigger($speaker_14); // play the sound
  sys.trigger($speaker_13); // play the sound
  sys.wait(2); // wait a while before teleport, so the player can hear the sound
  $player1.setOrigin($teleport1.getOrigin());
  $player1.setAngles($teleport1.getAngles());
}
 }
}

Link to comment
Share on other sites

Regarding the $player1.setAngles(...) part, it doesn't seem to work. I tested it myself and the viewing direction is not changed at all. Is there another way to change the direction the player looks at after a cinematic?

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

Actually not sure.

 

Does this code have a bracket or two wrong?

 

if ( ( $player1.getObjectiveState(1) == 1 ) && ( $player1.getObjectiveState(6) == 1 ) &&

( ( $player1.getObjectiveState(2) == 1 ) || ( $player1.getObjectiveState(3) == 1 ) || ( $player1.getObjectiveState(4) == 1 ) ) )

{

($player1.heldEntity() == $scepter)

{

sys.trigger($speaker_14); //play the sound

sys.trigger($speaker_13); //play the sound

sys.wait(2); //wait a while befor teleport, so the player can hear the sound

$player1.setOrigin($teleport1.getOrigin());

$player1.setAngles($teleport1.getAngles());

} // the objectives have been met

}

else

{

// the objectives haven't been met

}

void checkForScepter()

{

}

Laptop:Metabox P370SM3- Intel Core i7-4800MQ- 2x GTX780M SLI- 16G 1600Mhz- 500G Samsung mSata-1TB Hitachi HDD- 120Hz LG 1080p.Desktops:i75930k-2x GTX980 SLI-16G 2133Mhz-Evo120GSSD-Swift PG278Q1440p Gsync.Spare:AMD A10-7850K-APU-8G 1866Mhz-seagate 4TB-120G ssd. LoL Old:P75-1:1FSB-8M ram 512MB Maxtor HDD-1MB Cirrus Logic video chip-still got the parts somewhere?First PC-Tandy 512K Color computer.

Link to comment
Share on other sites

Hay grayman do you have my code WOW. Thanks Heaps & Heaps.:)

Laptop:Metabox P370SM3- Intel Core i7-4800MQ- 2x GTX780M SLI- 16G 1600Mhz- 500G Samsung mSata-1TB Hitachi HDD- 120Hz LG 1080p.Desktops:i75930k-2x GTX980 SLI-16G 2133Mhz-Evo120GSSD-Swift PG278Q1440p Gsync.Spare:AMD A10-7850K-APU-8G 1866Mhz-seagate 4TB-120G ssd. LoL Old:P75-1:1FSB-8M ram 512MB Maxtor HDD-1MB Cirrus Logic video chip-still got the parts somewhere?First PC-Tandy 512K Color computer.

Link to comment
Share on other sites

Regarding the $player1.setAngles(...) part, it doesn't seem to work. I tested it myself and the viewing direction is not changed at all. Is there another way to change the direction the player looks at after a cinematic?

 

I thought of a cinematic for my mission but the logistics alone stop me from trying.

 

Is this a sign that your next mission will have cinema? If so I will continue waiting in anticipation. :ph34r:

Laptop:Metabox P370SM3- Intel Core i7-4800MQ- 2x GTX780M SLI- 16G 1600Mhz- 500G Samsung mSata-1TB Hitachi HDD- 120Hz LG 1080p.Desktops:i75930k-2x GTX980 SLI-16G 2133Mhz-Evo120GSSD-Swift PG278Q1440p Gsync.Spare:AMD A10-7850K-APU-8G 1866Mhz-seagate 4TB-120G ssd. LoL Old:P75-1:1FSB-8M ram 512MB Maxtor HDD-1MB Cirrus Logic video chip-still got the parts somewhere?First PC-Tandy 512K Color computer.

Link to comment
Share on other sites

Why not just activate the teleporter?

info_player_teleport does not work. The game crashes if it get's triggered.

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

Actually not sure.

 

Does this code have a bracket or two wrong?

 

if ( ( $player1.getObjectiveState(1) == 1 ) && ( $player1.getObjectiveState(6) == 1 ) &&

( ( $player1.getObjectiveState(2) == 1 ) || ( $player1.getObjectiveState(3) == 1 ) || ( $player1.getObjectiveState(4) == 1 ) ) )

{

($player1.heldEntity() == $scepter)

{

sys.trigger($speaker_14); //play the sound

sys.trigger($speaker_13); //play the sound

sys.wait(2); //wait a while befor teleport, so the player can hear the sound

$player1.setOrigin($teleport1.getOrigin());

$player1.setAngles($teleport1.getAngles());

} // the objectives have been met

}

else

{

// the objectives haven't been met

}

void checkForScepter()

{

}

You've copied it wrong. checkForScepter() goes to the beginning.

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

No worries Obstortte grayman posted just what I needed. I'm almost sure grayman has telepathetic abilities ( sorry grayman just joking) seems

like grayman can code like the wind hay.

 

void checkForScepter()

{

if ( ( $player1.getObjectiveState(1) == 1 ) && ( $player1.getObjectiveState(6) == 1 ) &&

( ( $player1.getObjectiveState(2) == 1 ) || ( $player1.getObjectiveState(3) == 1 ) || ( $player1.getObjectiveState(4) == 1 ) ) )

{

// the objectives have been met

 

if ($player1.heldEntity() == $scepter)

{

sys.trigger($speaker_14); // play the sound

sys.trigger($speaker_13); // play the sound

sys.wait(2); // wait a while before teleport, so the player can hear the sound

$player1.setOrigin($teleport1.getOrigin());

$player1.setAngles($teleport1.getAngles());

}

}

}

Laptop:Metabox P370SM3- Intel Core i7-4800MQ- 2x GTX780M SLI- 16G 1600Mhz- 500G Samsung mSata-1TB Hitachi HDD- 120Hz LG 1080p.Desktops:i75930k-2x GTX980 SLI-16G 2133Mhz-Evo120GSSD-Swift PG278Q1440p Gsync.Spare:AMD A10-7850K-APU-8G 1866Mhz-seagate 4TB-120G ssd. LoL Old:P75-1:1FSB-8M ram 512MB Maxtor HDD-1MB Cirrus Logic video chip-still got the parts somewhere?First PC-Tandy 512K Color computer.

Link to comment
Share on other sites

just a question out of the Blue.

 

Does the burnaway arg work?

Edited by Tr00pertj

Laptop:Metabox P370SM3- Intel Core i7-4800MQ- 2x GTX780M SLI- 16G 1600Mhz- 500G Samsung mSata-1TB Hitachi HDD- 120Hz LG 1080p.Desktops:i75930k-2x GTX980 SLI-16G 2133Mhz-Evo120GSSD-Swift PG278Q1440p Gsync.Spare:AMD A10-7850K-APU-8G 1866Mhz-seagate 4TB-120G ssd. LoL Old:P75-1:1FSB-8M ram 512MB Maxtor HDD-1MB Cirrus Logic video chip-still got the parts somewhere?First PC-Tandy 512K Color computer.

Link to comment
Share on other sites

just a question out of the Blue.

 

Does the burnaway arg work?

This really sounds like the doom3 burnaway. If you wan't to have something similar to that, I can set up something for you. I still have some nice ai skins plus effects available that strongly goes into that direction. Just pm me.

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

I've had no problems w/it. Is there a bugtracker issue describing the specific situation?

I placed the entity and trigger it and boom, the game crashes. I have no tracker entry set up for this. Maybe I'm doing something wrong :unsure:

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

I placed the entity and trigger it and boom, the game crashes. I have no tracker entry set up for this. Maybe I'm doing something wrong :unsure:

 

Perhaps describing how you're using it might give us some clues. If I can reproduce the crash, it needs an issue filed.

Link to comment
Share on other sites

Make sure to target the entity to the player start first.

I don't understand that.

Perhaps describing how you're using it might give us some clues. If I can reproduce the crash, it needs an issue filed.

I placed a info_player_teleport were I want the player to be teleported to. Then I trigger it and boom, TDM crashes. I trigger it from script using sys.trigger(...).

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

Maybe I should use $teleportername.activate($player1)!? Will test it.

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

When I searched existing maps for info_player_teleport, I found several instances. I looked at holetower.map and saw that the entity must be targeted to info_player_start.

 

So if I have an info_player_teleport named $Teleport, I then assume that if a script does this:

 

$Teleport.activate($player1);

 

The player will be teleported to $Teleport (i.e. given its "origin" and "angle" setting).

Link to comment
Share on other sites

Yep, this way it works.

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

hi all, i am in need of a way to trigger on location, but i cant find out how to get it done

it is a Movable entity wich should go to a specified location and then it should trigger, i tried a trigger once with any touch, but no advance the trigger is not responding to the movable.

 

found it, i needed to bind a function activator to it

Edited by Garreth

Taf you, you taffin taffer

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

    • 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.
      · 0 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 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
×
×
  • Create New...