Script assistance needed

Post » Wed Apr 07, 2010 7:24 am

I'm trying to get a script working that will assign an alias to a custom race using obse's SetRaceAlias command.

This works...
scriptname CustomRaceIsDefaultRaceshort doOncebegin menumode	if doOnce == 1		return	else		SetRaceAlias ChocolateElf DarkElf		set doOnce to 1	endifStopQuest CustomRaceFixend


This doesn't...
scriptname CustomRaceIsDefaultRaceshort doOncebegin menumode	if doOnce == 1		return	elseif GetPCisRace ChocolateElf == 1		SetRaceAlias ChocolateElf DarkElf		set doOnce to 1	elseif GetPCisRace Tabaxi == 1		SetRaceAlias Tabaxi Khajiit		set doOnce to 1	elseif GetPCisRace TabaxiWhite == 1		SetRaceAlias TabaxiWhite Khajiit		set doOnce to 1	elseif GetPCisRace TabaxiTabby == 1		SetRaceAlias TabaxiTabby Khajiit		set doOnce to 1	elseif GetPCisRace NecSonnetMature == 1		SetRaceAlias NecSonnetMature Breton		set doOnce to 1	elseif GetPCisRace NecSonnetSweet == 1		SetRaceAlias NecSonnetSweet Breton		set doOnce to 1	elseif GetPCisRace NecSonnetKSpoiled == 1		SetRaceAlias NecSonnetKSpoiled Breton		set doOnce to 1	elseif GetPCisRace ctype1 == 1		SetRaceAlias ctype1 Imperial		set doOnce to 1	elseif GetPCisRace CuteElf == 1		SetRaceAlias CuteElf WoodElf		set doOnce to 1	elseif GetPCisRace RenMysticElfF == 1		SetRaceAlias RenMysticElfF WoodElf		set doOnce to 1	elseif GetPCisRace RenMysticElfFtt01 == 1		SetRaceAlias RenMysticElfFtt01 WoodElf		set doOnce to 1	elseif GetPCisRace NecMysticHighElf == 1		SetRaceAlias NecMysticHighElf HighElf		set doOnce to 1	elseif GetPCisRace NecMysticDarkElf == 1		SetRaceAlias NecMysticDarkElf DarkElf		set doOnce to 1	elseif GetPCisRace Neckarla == 1		SetRaceAlias Neckarla HighElf		set doOnce to 1	endifStopQuest CustomRaceFixend

Where have I gone wrong?
User avatar
Kevin Jay
 
Posts: 3431
Joined: Sun Apr 29, 2007 4:29 am

Post » Wed Apr 07, 2010 6:31 am

What part of the scrip do you think is having an issue, is it that certain races wont work or ALL the races wont fix... I'm not a wiz at scripting but just try spacing "elseif" to just "else"

I'm not very good with scripting... but the best advice I can give as a fellow modder is to just try changing different elements in the script.

dbug
User avatar
Gavin boyce
 
Posts: 3436
Joined: Sat Jul 28, 2007 11:19 pm

Post » Tue Apr 06, 2010 9:23 pm

It's not applying SetRaceAlias to any of the custom races I have it checking. I'm pretty sure it needs to be an "if" check. If PC race is xxxx then set alias to yyyy.
User avatar
Rebekah Rebekah Nicole
 
Posts: 3477
Joined: Fri Oct 13, 2006 8:47 pm


Return to IV - Oblivion