Check if bones intersect player to get transparent
Posted: Thu Jan 14, 2016 4:14 am
I need some some help with a Pillar Pawn to check if Player is behind the pillar to reduce the pillar actor transparency so you can see the player when he is behind it.
I would like to check if player moves in the zone with two bones so you can not crouch or jump over the bones.
In the isometric view i use, imagine in the top view the position Player the gets hidden would be of the pillar,like 45 degrees diagonally right and up from the pawn.
So,lets say i want the offset to be 128 units from the pillar.
If you know an easier better way to to this you tell me please.
I would like an example if you can,with the following:
I was thinking having Orders like
Idle (checking if player is intersecting)
Transparent (change the alpha to semi transparent and continue checking player intersections,if not go back to idle)
SetAlpha(float Alpha);
Set the transparency for the Pawn's actor.
Any examples would be appreciated,i would like to see again how you use that "if" thing and the true or false flags results.
I do not try another way to check this using clip or transparent triggers because clips would be too low on ground and you could jump over them while invisible brush triggers would receive stencil shadows and would have to add more and smaller of them for each pillar so any shadow on them would not be very noticeable.
Also, i am not sure yet how to check the list of those triggers instead of just one.
I mean the if(GetEventState("Pillar1Trigger1") = true)
or if(GetEventState("Pillar1Trigger2") = true)
i do not know how you put the "or" syntax either,if you tell me that it would be good to know because am still looking old demo sample scripts for examples.
I would like to check if player moves in the zone with two bones so you can not crouch or jump over the bones.
In the isometric view i use, imagine in the top view the position Player the gets hidden would be of the pillar,like 45 degrees diagonally right and up from the pawn.
So,lets say i want the offset to be 128 units from the pillar.
If you know an easier better way to to this you tell me please.
I would like an example if you can,with the following:
I was thinking having Orders like
Idle (checking if player is intersecting)
Transparent (change the alpha to semi transparent and continue checking player intersections,if not go back to idle)
and then in transparent orderstring TraceToActor(string BoneName, float OffsetX, float OffsetY, float OffsetZ);
Traces a line from the specified bone to a point defined by a specified offset and returns the szEntityName of any pawn actor that it intersects. If it does not intersect with a pawn, it returns the string "FALSE". The offset is relative to the direction the pawn is facing. If the bone does not exist it returns "FALSE".
SetAlpha(float Alpha);
Set the transparency for the Pawn's actor.
Any examples would be appreciated,i would like to see again how you use that "if" thing and the true or false flags results.
I do not try another way to check this using clip or transparent triggers because clips would be too low on ground and you could jump over them while invisible brush triggers would receive stencil shadows and would have to add more and smaller of them for each pillar so any shadow on them would not be very noticeable.
Also, i am not sure yet how to check the list of those triggers instead of just one.
I mean the if(GetEventState("Pillar1Trigger1") = true)
or if(GetEventState("Pillar1Trigger2") = true)
i do not know how you put the "or" syntax either,if you tell me that it would be good to know because am still looking old demo sample scripts for examples.