Sorry to be asking what is probably a really silly question with a blatantly obvious answer... but I've been away from coding for a while & I'm now trying to do a really basic little visualisation that uses a `portal` that I can't seem to get working properly... I know the problem is probably so obvious that I'm almost afraid to ask lol
But... this works... ie: when the player comes into contact with the portal... one scenery mesh is `hidden` & another is `shown`...
If EntityCollided(player,3)
HideEntity mesh
ShowEntity mesh2
EndIf
My problem starts when I add a `switch` so that when the player re-collides with the `portal` the scenery meshes switch back... I've added a global named `location` with a value of either 0 or 1... set by the collision with the portal... ie:
If location=0
If EntityCollided(player,3)
HideEntity mesh
ShowEntity mesh2
location=1
EndIf
EndIf
If location=1
If EntityCollided(player,3)
HideEntity mesh2
ShowEntity mesh
location=0
EndIf
EndIf
For some reason absolutely nothing happens when the player collides with the `portal` now?... could someone please tell me why :)
Thanks
BTW... I set `location=0` in the initialisation, so it does have an initial value.
But... this works... ie: when the player comes into contact with the portal... one scenery mesh is `hidden` & another is `shown`...
If EntityCollided(player,3)
HideEntity mesh
ShowEntity mesh2
EndIf
My problem starts when I add a `switch` so that when the player re-collides with the `portal` the scenery meshes switch back... I've added a global named `location` with a value of either 0 or 1... set by the collision with the portal... ie:
If location=0
If EntityCollided(player,3)
HideEntity mesh
ShowEntity mesh2
location=1
EndIf
EndIf
If location=1
If EntityCollided(player,3)
HideEntity mesh2
ShowEntity mesh
location=0
EndIf
EndIf
For some reason absolutely nothing happens when the player collides with the `portal` now?... could someone please tell me why :)
Thanks
BTW... I set `location=0` in the initialisation, so it does have an initial value.