A little scripting help please?

Post » Thu Dec 02, 2010 1:02 pm

Hello, I'm working on the siren song ability for the http://www.gamesas.com/index.php?/topic/1146996-wip-wasteland-succubus/ trait and perk mod that I am working on and I am trying to create a base effect to use on a perk that only works on those that are hostile to you. I cant for the life of me get it to save. It shows with no errors in Cipsis's Script validator so I thought it would allow me to save, but alas I cant figure out what is wrong. Any help would be greatly appreciated. I will credit you! :D

Also I'm really new to this scripting thing. Will the functions that I used work for what I am trying to do? It took me a while to come up with this.

scn WSSirenSongBASEScriptref EnemyBegin ScriptEffectStartif {getplayerteammate == 0} && {getfactionrelation Player == 1}	scaonactor	setplayerteammate 1	set Enemy to selfendifEndBegin ScriptEffectFinishEnemy.setplayerteammate 0if {getplayerteammate == 0} && {getfactionrelation Player == 1}	startcombat PlayerendifEnd

User avatar
Sakura Haruno
 
Posts: 3446
Joined: Sat Aug 26, 2006 7:23 pm

Post » Thu Dec 02, 2010 5:54 am

For starters, you want paranthesis '(' and ')' rather than '{' and '}'. Also, the GetSelf part is unnecessary as the code will work implicitly. The second block can do without the GetPlayerTeammate check as it unilaterally sets 'em to not be.
Spoiler
scn WSSirenSongBASEScript  ;ref Enemy ; Works Implicitly Begin ScriptEffectStart 	If GetPlayerTeammate	ElseIf (GetFactionRelation Player == 1)		StopCombatAlarmOnActor		SetPlayerTeammate 1		;Set Enemy to self	EndIfEnd  Begin ScriptEffectFinish	SetPlayerTeammate 0 ; *	; *If GetPlayerTeammate 	If (GetFactionRelation Player == 1)		StartCombat Player 	EndIfEnd
...Hope something in there helps.
User avatar
Blaine
 
Posts: 3456
Joined: Wed May 16, 2007 4:24 pm

Post » Thu Dec 02, 2010 1:04 pm

For starters, you want paranthesis '(' and ')' rather than '{' and '}'. Also, the GetSelf part is unnecessary as the code will work implicitly. The second block can do without the GetPlayerTeammate check as it unilaterally sets 'em to not be....Hope something in there helps.



Thanks much for the reply. :)

I'm adding this effect to a grenade so the effect will hit my personal companions as well. Will this make my companions disband from me as well if I don't put the Getplayerteammate checks and getself since it will run on everything in the radius? It is supposed to be a song that everyone hears the only reason i want to make the enemies join you as companions is so you can talk to them and feed on them. the effect should only last 1second per player charisma point. Also does StopCombatAlarmOnActor only stop it for a second or the duration of the effect?
User avatar
jeremey wisor
 
Posts: 3458
Joined: Mon Oct 22, 2007 5:30 pm

Post » Thu Dec 02, 2010 4:52 am

oooh colorful :drool:
User avatar
jessica breen
 
Posts: 3524
Joined: Thu Aug 03, 2006 1:04 am


Return to Fallout: New Vegas