Jump to content

Unclear about object identifiers


i30817

Recommended Posts

The context is checking in a single block preconditions on all the party for a party buff spell

 

If i do this:

 

!CheckStatGT([PC], 1, SCRIPTINGSTATE6)

 

It won't check ALL the party for the condition right? Just the first? (I'm hoping for all obviously).

 

If it is just the first, what's the use of things like?

!CheckStatGT(Nearest([PC]), 1, SCRIPTINGSTATE6)

 

And, more importantly, how can i do it - i have to Continue() the execution, so a cascading sequence of action-trigger blocks for all cases won't do.

Link to comment
It won't check ALL the party for the condition right? Just the first? (I'm hoping for all obviously).

Just the first valid...

 

why not check for all 6 at once? if one doesn't have it the block fails. as in

 

!CheckStatGT(Player1, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player2, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player3, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player4, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player5, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player6, 1, SCRIPTINGSTATE6)

 

but if you put 'em in an OR it'll be the same as

!CheckStatGT([PC], 1, SCRIPTINGSTATE6)

 

why not simplify things? Go with making sure that the protagonist gets all the buffs and stuff, let other party members suffer. after all they are just meat shields with the sole purpose of keeping the protagonist alive :p

 

If it is just the first, what's the use of things like?

!CheckStatGT(Nearest([PC]), 1, SCRIPTINGSTATE6)

so you could have an actor outside the party check the nearest party member to them for the stat in question. Else in the party it just might return the party member running the script block since they would be the nearest PC
Link to comment
It won't check ALL the party for the condition right? Just the first? (I'm hoping for all obviously).
A [spec] is the nearest visible living object matching spec, relative to the object running the script.

 

So it would return the party member who is nearest to this script-runner, who is alive and visible (either not invisible or the object can see through invisibility). If the script-runner is a party member, they will never be returned (it doesn't ever give you the same object).

 

!CheckStatGT(Nearest([PC]), 1, SCRIPTINGSTATE6)
Just to note, Nearest does not work. It will return nonsense (but [spec] is already nearest, so it's also redundant).

 

Second- through EighthNearest do work. These will always return the linked object as long as one is valid (the nearest matching object is also the eighth nearest matching object, unless there are more than one that match, in which case it's the furthest out to eight objects, ordered by distance).

Link to comment

What

why not check for all 6 at once? if one doesn't have it the block fails. as in

 

!CheckStatGT(Player1, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player2, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player3, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player4, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player5, 1, SCRIPTINGSTATE6)

!CheckStatGT(Player6, 1, SCRIPTINGSTATE6)

 

but if you put 'em in an OR it'll be the same as

!CheckStatGT([PC], 1, SCRIPTINGSTATE6)

 

But what happens if the party is not filled or partly dead?!?

 

CheckStatGT(Player6, 1, XXXXXXXX)

returns true, or false if Player6 is not a party member? What if it dead?

Link to comment

I decided to simplify; remove the conditions except a "Myself" version, move the party buffs to the beginning of the section that affects that buff, and make a note for the user that party wide buffs are cast first.

 

But i'd still like to know (for reference) what happens in a trigger that uses Player6 and it is not a party member (party not filled).

Link to comment

But what happens if the party is not filled or partly dead?!?

 

CheckStatGT(Player6, 1, XXXXXXXX)

returns true, or false if Player6 is not a party member? What if it dead?

player 6 is dead or not present then the check fails and block doesn't trigger

 

I see (while typing this) you decided to go with something else. however i'm not letting my typing go to waste. list of blocks to catch all possible party configurations and perform whatever action you want. should happen in one pass so no rounds wasted... just script bloat due to # of blocks

 

....

 

 

//if player solo
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
!Exist(Player3)
!Exist(Player4)
!Exist(Player5)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//**************************
//p1 & p2  2-5 members
//**************************
//2 members p1 p2
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
!Exist(Player3)
!Exist(Player4)
!Exist(Player5)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p2 p3
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
CheckStatGT(Player3, 1, XXXXXXXX)
!Exist(Player4)
!Exist(Player5)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p2 p4
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
!Exist(Player3)
CheckStatGT(Player4, 1, XXXXXXXX)
!Exist(Player5)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p2 p5
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
!Exist(Player3)
!Exist(Player4)
CheckStatGT(Player5, 1, XXXXXXXX)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p2 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
!Exist(Player3)
!Exist(Player4)
!Exist(Player5)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//4 members p1, p2, p3, p4
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
CheckStatGT(Player3, 1, XXXXXXXX)
CheckStatGT(Player4, 1, XXXXXXXX)
!Exist(Player5)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//4 members p1, p2, p3, p5
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
CheckStatGT(Player3, 1, XXXXXXXX)
!Exist(Player4)
CheckStatGT(Player5, 1, XXXXXXXX)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//4 members p1, p2, p3, p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
CheckStatGT(Player3, 1, XXXXXXXX)
!Exist(Player4)
!Exist(Player5)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//4 members p1, p2, p4, p5
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
!Exist(Player3)
CheckStatGT(Player4, 1, XXXXXXXX)
CheckStatGT(Player5, 1, XXXXXXXX)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//4 members p1, p2, p4, p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
!Exist(Player3)
CheckStatGT(Player4, 1, XXXXXXXX)
!Exist(Player5)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//4 members p1 p2 p5 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
!Exist(Player3)
!Exist(Player4)
CheckStatGT(Player5, 1, XXXXXXXX)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//5 members p1 p2 p3 p4 p5
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
CheckStatGT(Player3, 1, XXXXXXXX)
CheckStatGT(Player4, 1, XXXXXXXX)
CheckStatGT(Player5, 1, XXXXXXXX)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//5 members p1 p2 p3 p4 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
CheckStatGT(Player3, 1, XXXXXXXX)
CheckStatGT(Player4, 1, XXXXXXXX)
!Exist(Player5)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//5 members p1 p2 p3 p5 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
CheckStatGT(Player3, 1, XXXXXXXX)
!Exist(Player4)
CheckStatGT(Player5, 1, XXXXXXXX)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//5 members p1 p2 p4 p5 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
!Exist(Player3)
CheckStatGT(Player4, 1, XXXXXXXX)
CheckStatGT(Player5, 1, XXXXXXXX)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//****************
//p1 & p3 2-5 members (no p2)
//****************
//2 members p1 p3
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
CheckStatGT(Player3, 1, XXXXXXXX)
!Exist(Player4)
!Exist(Player5)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p3 p4
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
CheckStatGT(Player3, 1, XXXXXXXX)
CheckStatGT(Player4, 1, XXXXXXXX)
!Exist(Player5)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p3 p5
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
CheckStatGT(Player3, 1, XXXXXXXX)
!Exist(Player4)
CheckStatGT(Player5, 1, XXXXXXXX)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p3 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
CheckStatGT(Player3, 1, XXXXXXXX)
!Exist(Player4)
!Exist(Player5)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//4 members p1 p3 p4 p5
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
CheckStatGT(Player3, 1, XXXXXXXX)
CheckStatGT(Player4, 1, XXXXXXXX)
CheckStatGT(Player5, 1, XXXXXXXX)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//4 members p1 p3 p4 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
CheckStatGT(Player3, 1, XXXXXXXX)
CheckStatGT(Player4, 1, XXXXXXXX)
!Exist(Player5)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//4 members p1 p3 p5 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
CheckStatGT(Player3, 1, XXXXXXXX)
!Exist(Player4)
CheckStatGT(Player5, 1, XXXXXXXX)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//5 members p1 p3 p4 p5 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
CheckStatGT(Player3, 1, XXXXXXXX)
CheckStatGT(Player4, 1, XXXXXXXX)
CheckStatGT(Player5, 1, XXXXXXXX)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//****************
//p1 & p4 2-5 members (no p2 p3)
//****************
//2 members p1 p4
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
!Exist(Player3)
CheckStatGT(Player4, 1, XXXXXXXX)
!Exist(Player5)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p4 p5
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
!Exist(Player3)
CheckStatGT(Player4, 1, XXXXXXXX)
CheckStatGT(Player5, 1, XXXXXXXX)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p4 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
!Exist(Player3)
CheckStatGT(Player4, 1, XXXXXXXX)
!Exist(Player5)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//4 members  p1 p4 p5 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
!Exist(Player3)
CheckStatGT(Player4, 1, XXXXXXXX)
CheckStatGT(Player5, 1, XXXXXXXX)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//****************
//p1 & p5 2-5 members (no p2 p3 p4)
//****************
//2 members p1 p5
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
!Exist(Player3)
!Exist(Player4)
CheckStatGT(Player5, 1, XXXXXXXX)
!Exist(Player6)
THEN
RESPONSE #100
//do actions
END
//3 members p1 p5 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
!Exist(Player3)
!Exist(Player4)
CheckStatGT(Player5, 1, XXXXXXXX)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//****************
//p1 & p6 2-5 members (no p2 p3 p4 p5)
//****************
//2 members p1 p6
IF
CheckStatGT(Player1, 1, XXXXXXXX)
!Exist(Player2)
!Exist(Player3)
!Exist(Player4)
!Exist(Player5)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END
//****************
//6 members
IF
CheckStatGT(Player1, 1, XXXXXXXX)
CheckStatGT(Player2, 1, XXXXXXXX)
CheckStatGT(Player3, 1, XXXXXXXX)
CheckStatGT(Player4, 1, XXXXXXXX)
CheckStatGT(Player5, 1, XXXXXXXX)
CheckStatGT(Player6, 1, XXXXXXXX)
THEN
RESPONSE #100
//do actions
END

 

prolly more script blocks than you want but it would cover all possibilities (i think....)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...