A few scripting questions

Post » Sat May 28, 2011 5:37 pm

Alright so I am working on a few different mods and I am starting to feel like he guy who made star wars, as in, what I want to do, scripting isnt there yet.

1.) In oblivion there was a command for OBSE that would check to see if something was in the name of something
ex. Brotherhood Power Armor, and I was looking for Power, the function would return true.
My questions, does this exist within FOSE?

2.)I don't work with FOSE every much, but I am working on a mod, and I want to make a smart key.
ex. when you hold down the key it will do something different then when you just hit.
Could some one please help me understand how to do this?

3.)More on my "smart key" I would also like it to do something completely when you are in combat.
ex. out of combat, switch weapon to another weapon, in combat switch fire rate
This should be really simple, but if you have an example post it here please?

I am thing three should be as simple as
If player.isincombat = 1
;do this
else
;dothis
endif
User avatar
Queen Bitch
 
Posts: 3312
Joined: Fri Dec 15, 2006 2:43 pm

Post » Sat May 28, 2011 1:12 pm

FOSE's lacking a bunch of OBSE functions related to names as I think they planned to port across the string variables but never got round to it. If you're checking for power armour, though, why not use IsPowerArmor?

Also you'd just use IsKeyPressed for hotkeys, and it's already in, so...
User avatar
Riky Carrasco
 
Posts: 3429
Joined: Tue Nov 06, 2007 12:17 am

Post » Sat May 28, 2011 8:39 am

FOSE's lacking a bunch of OBSE functions related to names as I think they planned to port across the string variables but never got round to it. If you're checking for power armour, though, why not use IsPowerArmor?

Also you'd just use IsKeyPressed for hotkeys, and it's already in, so...


Well I am not I want to make a disguise mod that check what you are wearing by name. Most Brotherhood armors, have brotherhood in the name, so If you put on any armor from any mod or vanilla and it had brotherhood in the name it will add you to the brotherhood faction same goes for raider and enclave. Most mods, us this same style of name as the vanilla game. Guess I am going to have to fine another way.

Yes but how do I tell if they are holding it or just pressed it. It does two different things. I already have the script for when they just press it, My problem is I was playing last night when I realised I have only like 2 keys on my keyboard that don't do something.

So I want to change my script so it can do something like the following.

	if keytapped = true then		if curmod = 0 then			curmod = 1		elseif curmod = 1 then			curmod = 2		elseif curmod = 2 then			curmod = 3		elseif curmod = 3 then			curmod = 0		endif	elseif keyheldin = true then		if curmod = 0 then			if status = 0 then				status = 1			elseif status = 1 then				status = 2			elseif status = 2 then				status = 0			endif		elseif curmod = 1 then			if status = 0 then				status = 1			elseif status = 1 then				status = 2			elseif status = 2 then				status = 0			endif		elseif curmod = 2 then			if status = 0 then				status = 1			elseif status = 1 then				status = 2			elseif status = 2 then				status = 0			endif		elseif curmod = 3 then			if status = 0 then				status = 1			elseif status = 1 then				status = 2			elseif status = 2 then				status = 0			endif		endif	endif

User avatar
Céline Rémy
 
Posts: 3443
Joined: Sat Apr 07, 2007 12:45 am


Return to Fallout 3