Jump to content

Recommended Posts

I'm not sure if this is considered modding but...

 

Well i need to make sure my character is working properly by striking him with lightning.

Unfortunately most, if not all, of the don't starve commands don't do anything when using them in DST.

 

I did a little bit of research and found that some commands do work but are typed completely different compared to the wiki.

 

But getting back to the point, whats the command for lightning striking your character?

Edited by rons0n
Link to comment
https://forums.kleientertainment.com/forums/topic/49781-lightning-strike/
Share on other sites

@rons0n, actually, debug keys can do a lot more.

You can look at all of them in scripts/debugkeys.lua, but here's some of the more useful ones, the ones I personally use the most:

  • Ctrl+R: does a soft reset of the game. Very useful for testing mods.
  • Ctrl+Shift+R: Immediatly loads the last played world. Also does the same thing as Ctrl+R.
  • G: put your character in god mode, or resurrect it if it's dead.
  • T: teleports your character to the location of your mouse.
  • Shift+R: deletes the entity under your mouse. You can also use it on your character!
Edited by Jjmarco

@rons0n

TheWorld:PushEvent("ms_sendlightningstrike", ThePlayer:GetPosition()), although debug keys sound like a simpler solution.

 

 

 

@rons0n, actually, debug keys can do a lot more.

You can look at all of them in scripts/debugkeys.lua, but here's some of the more useful ones, the ones I personally use the most:

  • Ctrl+R: does a soft reset of the game. Very useful for testing mods.
  • Ctrl+Shift+R: Immediatly loads the last played world. Also does the same thing as Ctrl+R.
  • G: put your character in god mode, or resurrect it if it's dead.
  • T: teleports your character to the location of your mouse.
  • Shift+R: deletes the entity under your mouse. You can also use it on your character!

 

@Ryuushu Thank you!

@Jjmarco, Oh thank you so much, this will help me further with other characters that I wish to test with!

 

Though now i have to ask an embarrassing question, where is the modmain exactly? did you mean put the line in my character's modmain or?

Edited by rons0n

@rons0n

Type in the console TheWorld:PushEvent("ms_sendlightningstrike", ThePlayer:GetPosition()), although debug keys sound like a simpler solution.

 

@Ryuushu Is it possible to call a lightning strike on a certain player? I tried [...] ThePlayer:GetPosition(3) - where 3 is the player number from c_listallplayers() - but no go. I tried [...] AllPlayers:GetPosition(3) but that didn't work either. :frown-new:

 

Any idea?  :encouragement:

 

Also, sorry for replying to this old thread rather than starting a new one.  :hopelessness:

@Pill, you're using AllPlayers in the wrong fashion.

 

It would be AllPlayers[Player#]:GetPosition() instead of ThePlayer:GetPosition() 

 

@Kzisor Ahhh thank you! So if that's right, then the command would read:

TheWorld:PushEvent("ms_sendlightningstrike", AllPlayers[#]:GetPosition())

Yea? Anyway, just putting it here so myself and others have something to c/p.

If it's wrong I'll just edit it instead of posting again. :lol:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...