Jump to content

Quick Question - Quick Answer


Cipscis

Recommended Posts

I got it kinda working, it equips when I push Q (changed cos its easier to reach), however, I have to hold the button to keep the cloak equipped.

 

How can I fix it so It toggles and I don't have to hold it?

 

Here's my code:

 

SCN 01CloakX
Begin GameMode
	
If IsKeyPressed 16
	Player.Equipitem CloakDevice
Else
	Player.Unequipitem CloakDevice
	Endif
Endif
Endif
END

 

Thanks, Cipscis; your a lot of help!

What's happening is a form of "debouncing". Basically, the computer updates your key press so fast, it doesn't quite detect your key properly. Use the code Cipsis posted above if you haven't already, since it uses a method for solving that.

Link to comment
Share on other sites

  • Replies 804
  • Created
  • Last Reply

Top Posters In This Topic

No that doesn't work either, it just does the same as before.

 

I want it so when I push it once, the cloak goes on and when I take my finger off the button it stays on until I press the button a second time.

 

I think I may have confused you in the last reply, sorry.

Link to comment
Share on other sites

That's because, as I mentioned in the comments of the code, the second section of code will run when the key is released. You only want to run code when the key is pressed, so you shouldn't have any code within the "else" statement.

 

Cipscis

Link to comment
Share on other sites

It sounds like you haven't included any code to unequip the item when the key is pressed again. You'll probably want to use a variable to store whether or not the item is equipped so that you can run the appropriate code when the hotkey is pressed, or use GetEquipped.

 

Cipscis

Link to comment
Share on other sites

Yeah, it works now, but I have one final question, in the corner when I push Q I get a message saying: "Cloaking Device Equipped", how can I get rid of this message?

 

Thanks for your help guys!

Use the HideMessageFlag of EquipItem and its unequip counterpart.

Link to comment
Share on other sites

You're not only in the wrong thread, but the wrong forum. You're probably looking for the Fallout 3 Mod Detectives thread, which is stickied in the General Modification Talk forum. Please remember that you should always read, at the very least, the OP of a thread before you post in it.

 

Cipscis

 

EDIT:

 

I just noticed that this thread now has more views than the stickied FAQ thread. I guess it really is true that most people don't read stickied threads.

 

Cipscis

Link to comment
Share on other sites

is there any way to open the pipboy to the map screen at the press of a button?

 

Ex. I know how to bind something I just don't know how to open the pipboy to the map screen >_>

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...