Hi Chris
@ChrisIceBox, I have a problem. My game in general is a 3D game that has a direct control, however, except for hotspots. Everything seems to work fine except this: So I click on a hotspot, the player walks to it, but if I press W S D A keys he tries to move again and go back to Direct controls. This doesnt happen of course in the end but it looks very clumpsy! I tried everything (cutscene is checked, disable input on interaction etc) but I cant find a way to put input off. I looked into the script, probably I need to change a line in Char.cs or somewhere in input, but I am not completely sure where. Can you help me?
Comments
Please elaborate on the exact behaviour you're getting here, including screenshots of your Hotspot and Settings Manager.
if (AC.KickStater.stateHandler.gameState == GameState.Normal)
{
// OK to move!
}
More functions and variables like this can be found in section 12.7 of the manual.
public int PlayerHealth = 10;
void Update(){
AC.GlobalVariables.SetIntegerValue(5, PlayerHealth);
}
If a bullet hits the player, the bullet substracts 1 from the playerhealth. This works, because I can see in the GameEditor that the variable is updated at the correct time. (So PlayerHealth is basically a reference to the GameEditors variable that I created there). Now, if the players health is less than 0, I like something to happen. So, I made a big trigger that detects the player when he is in. In the trigger action I made one action: Variable Check, Source: Global, Variable PlayerHealth, Compare with: Entered Value, less than Integer 0. If condition is met: Continue, if condition is not met: Stop. So if the PlayerHealth is less than 0, Stop. But this doesnt work. My trigger type is set to Enter
but I also tried continuous which gave strange shaking results when the player is in and also didnt work. The strange thing is, if the players health is less than 0 at runtime and I putt away the trigger from the player and pull it back to the player, than the trigger is called and it does what it should. So the problem seems that the trigger isnt updated probably when the player is in. What do I do wrong? (I also used GlobalVariables.Download and UploadAll, just to see if this was the problem for the variable in my script but the result is the same).