|
member
|
OP
member
Joined: Oct 2014
|
Any idea why I'm getting errors with the following script? I tried adding AND and changing around the parentheses but nothing seemed to help. This script gives the error message [syntax error: "DialogStartTwoSpeakerDialog" unexpected.
IF ItemAddedToCharacter(ITEM_Artifact,CHARACTER_Player1) THEN TimerLaunch("GodwinLeave", 10000);
IF TimerFinished("GodwinLeave") THEN CharacterTeleportToTrigger(CHARACTER_Godwin1,TRIGGER_GodwinAppearLocation,"") DialogStartTwoSpeakerDialog("GodwinAngry",CHARACTER_Godwin1,_Player);
|
|
|
|
addict
|
addict
Joined: Jul 2014
|
You're missing a semicolon at the end of the teleport line.
|
|
|
|
member
|
OP
member
Joined: Oct 2014
|
The error message I receive now is [parameter 3 is an unbound variable]
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2014
|
IF TimerFinished("GodwinLeave") THEN CharacterTeleportToTrigger(CHARACTER_Godwin1,TRIGGER_GodwinAppearLocation,"") DialogStartTwoSpeakerDialog("GodwinAngry",CHARACTER_Godwin1,_Player); You can't use _Player in this case, because the object _Player is not used in the IF line. _Player is undefined in this script. Change it to _Player1 or _Player2 OR you can add an additional IF statement to define _Player.
|
|
|
|
addict
|
addict
Joined: Jul 2014
|
I think it would have to be CHARACTER_Player1 or CHARACTER_Player2 if you're specifying which character it is. If you don't care which character it is, then it could go like this:
IF
ItemAddedToCharacter(ITEM_Artifact, _Player)
AND
NOT DB_GodwinFinished(1)
THEN
DB_Godwin(_Player);
TimerLaunch("GodwinLeave", 10000);
IF
TimerFinished("GodwinLeave")
AND
DB_Godwin(_Player)
THEN
CharacterTeleportToTrigger(CHARACTER_Godwin1,TRIGGER_GodwinAppearLocation,"");
DialogStartTwoSpeakerDialog("GodwinAngry",CHARACTER_Godwin1, _Player);
DB_GodwinFinished(1);
Last edited by Rhidian; 15/12/14 04:53 PM.
|
|
|
|
member
|
OP
member
Joined: Oct 2014
|
I used Rhidan's script because I want the script to fire for both P1 and P2 and it worked, thanks both!
|
|
|
|
member
|
OP
member
Joined: Oct 2014
|
Using an old post for some troublesome new scripts:
#1. I want to change the atmosphere from rainy back to the default sunny one: Call: TriggerSetAtmosphere((STRING)_TriggerUUID,(STRING)_Atmosphere) Mine: TriggerSetAtmosphere("","default");
#2. I want my characters to face the player during dialog. Call: CharacterLookAtCharacter((CHARACTER)_Character, (CHARACTER)_TargetCharacter, (INTEGER)_SnapToTarget) Mine: CharacterLookAtCharacter(CHARACTER_Conrad, CHARACTER_Player1, 1);
#3. I want my Companion to have the crafting skill Call: CharacterAddTalent((CHARACTER)_Character, (STRING)_Talent); Mine: CharacterAddTalent(CHARACTER_Rogue, "Crafting");
|
|
|
|
enthusiast
|
enthusiast
Joined: Oct 2014
|
Are you getting errors or are they just not working?
I see a few issues:
Call: TriggerSetAtmosphere((STRING)_TriggerUUID,(STRING)_Atmosphere) Mine: TriggerSetAtmosphere("","default");
TriggerSetAtmosphere is used to set the atmosphere settings of an atmosphere trigger. It doesn't set an overall general atmosphere, it changes the settings of an atmosphere trigger. You're not referencing a trigger ("") so it's not going to do anything.
-------------
Call: CharacterLookAtCharacter((CHARACTER)_Character, (CHARACTER)_TargetCharacter, (INTEGER)_SnapToTarget) Mine: CharacterLookAtCharacter(CHARACTER_Conrad, CHARACTER_Player1, 1);
Not sure, never used it. If it's not working it's probably something to do with the integer. Try playing with it.
----------------
Call: CharacterAddTalent((CHARACTER)_Character, (STRING)_Talent); Mine: CharacterAddTalent(CHARACTER_Rogue, "Crafting");
I think you want to be adding an Ability, not a talent.
Try CharacterAddAbility
Last edited by Burgee; 07/01/15 02:53 AM.
|
|
|
|
member
|
OP
member
Joined: Oct 2014
|
Script #1 didn't produce an error but it also didn't change the atmosphere. I received an error (object "TRIGGER_AtmosphereTyphoon is not defined) when I changed it to: IF TimerFinished("CrystalReturned") THEN TriggerSetAtmosphere(TRIGGER_AtmosphereTyphoon, "default"); What's the difference between (String)_Event and (STRING)_TriggerUUID? On the Triggers side bar I noticed there is a "GUID" so I'm going to test that next. _____________________ Still stuck with #2 _____________________ #3 works now!
Last edited by JecklynHyde; 07/01/15 05:53 AM.
|
|
|
|
old hand
|
old hand
Joined: Aug 2014
|
For me "TriggerSetAtmosphere" never worked because if I recall there was a problem with making atmosphere triggers global or something like that (which kind of looks like the problem you're having with the atmosphere not being defined). Not sure if someone's gotten it to work, though maybe Burgee has.
|
|
|
|
old hand
|
old hand
Joined: Dec 2013
|
Script #1 didn't produce an error but it also didn't change the atmosphere. I received an error (object "TRIGGER_AtmosphereTyphoon is not defined) when I changed it to:
IF TimerFinished("CrystalReturned") THEN TriggerSetAtmosphere(TRIGGER_AtmosphereTyphoon, "default");
What's the difference between (String)_Event and (STRING)_TriggerUUID?
On the Triggers side bar I noticed there is a "GUID" so I'm going to test that next. Yes, you're on the right track. Atmosphere triggers aren't reckoned as triggers in the normal sense and hence they can't be referenced by simple names. You need that long GUID hash for the name. Here is an example of mine that worked: IF DB_SCHED_CurrentHour(_Hour) AND DB_Atmos_Setting(_Hour, _atmos) THEN TriggerSetAtmosphere("45da1980-1e2f-4ade-bcd4-552588a9d2da", _atmos); The stuff beforehand was just a way to make it easier to define all my atmospheres at a given hour using databases.
Last edited by Windemere; 07/01/15 02:09 PM.
|
|
|
|
member
|
OP
member
Joined: Oct 2014
|
Yeah, the atmosphere changed when I set it to TriggerSetAtmosphere("375fb183-cd31-4cf4-929d-064657297f5c", "default"); so thats two scripts down now Still trying to figure out how to make NPCs face the player.
|
|
|
|
member
|
OP
member
Joined: Oct 2014
|
I want an NPC to teleport to a location if a certain global event is set and if he is currently in the party. So I suppose I need the script to check for two events. Or alternatively, for a timer and an event. But I always get a DIV event allowed only as the first condition of a rule error. Any ideas how I could make this script work?
IF GlobalEventSet("ConradHired") AND TimerFinished("TPconrad") THEN CharacterTeleportToTrigger(CHARACTER_Conrad, TRIGGER_ConradLocation,"");
Edit: Since he's in the party he always teleports with Player1 to that location, but I need him to follow Player2. I tried to edit his hiring script to attach to Player2 but that made no difference
Last edited by JecklynHyde; 10/01/15 07:56 AM.
|
|
|
|
addict
|
addict
Joined: Apr 2013
|
Just use a temporary db:
IF GlobalEventSet("ConradHired") THEN DB_ConradHired(1);
IF TimerFinished("TPconrad") AND DB_ConradHired(1) THEN CharacterTeleportToTrigger(CHARACTER_Conrad, TRIGGER_ConradLocation,"");
|
|
|
Moderated by Bvs, ForkTong, gbnf, Issh, Kurnster, Larian_QA, LarSeb, Lar_q, Lynn, Monodon, Raze, Stephen_Larian
|
|