Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Object Activator acts Static


TheWhispers
 Share

Recommended Posts

I'm not exactly sure if I hit the right subtopic here. Anyway, I am making a cool little mod no one has made but that I thought would be incredibly useful for everyone here that STILL plays Oblivion.

I wrote a Object Activator script for this object I'd like people to activate with a button (like opening a door). In order to buy a lantern.

ScriptName TheWhispersBuyLantern

Short Choice

Begin OnActivate
Set Choice to GetButtonPressed

if(Choice != -1 && IsActionRef Player)
	if(Choice == 0);yes
		if(Player.GetGold >= 100)
			;give lantern and msgbox
			MessageBox "Enjoy your new lantern! You can always come back and buy another one if you lose this one."
			;give goes here
		endif
		elseif(Player.GetGold < 100)
			MessageBox "It appears your coin purse is a bit light."
			;Leave
		endif
	endif
	elseif(Choice == 1);no
		;rid of menu
	endif
 endif
elseif(IsActionRef Player == 0)
;NPC activated, do nothing
endif
end


However when I walk into the place where the activator is, it acts like a static object. My nif file (completely custom from the ground up mesh) for the object works perfectly, but it doesn't have collison. What I mean by it acts static, is you cannot activate it with a button or anything and when you look at it that icon doesn't show up showing you you can activate it (like an altar). I compared my code to the altar code and it's pretty close in concept. I really hope it's not my nif file. Does the game need collision activated on the mesh in order to register that the player is looking at it in order to prompt for activation? What's going on here?

Yup it's my nif file. I believe it needs collision because I switched the activator nif with some random nif in my mods here and it worked. I opened that nif in nifskope and it has collision hulls right where my mouse was that made it work. Alrighty so it'll work if I just scribble in some collision here. Code doesn't work properly though, gotta put that OnActivate Code back in GameMode.

Solved, I just had to add collision and all the flags for it in Nifskope and now it works!

Thanks!

Edited by TheWhispers
Link to comment
Share on other sites

14 hours ago, HeyYou said:

Awesome. :)

 

It's nice to see that folks are still modding Oblivion. :D

Thanks! Oblivion is my childhood game and I'll easily be playing it 20 years from now lol. I just posted another question about mounting a clothing item to a custom bone node from Universal Skeleton over in Modelling. If you could be of any help that'd be great.

Link to comment
Share on other sites

1 hour ago, TheWhispers said:

Thanks! Oblivion is my childhood game and I'll easily be playing it 20 years from now lol. I just posted another question about mounting a clothing item to a custom bone node from Universal Skeleton over in Modelling. If you could be of any help that'd be great.

I don't have a clue about that..... :)

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.
Note: Your post will require moderator approval before it will be visible.

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.

 Share

×
×
  • Create New...