edited November 2016 in ORK Support
Hii,

Recently I found another issue with my characters group and I´ve tried to solve them without no solution.

The first problem starts when one or some of my group characters die and then enter to a new scene, because the dead characters appear beside of my player character and don´t stay dead in the place they have been killed. I´ve tried to set a Game Variable to death settings but nothing happens and I still seeing the issue.

The second problem I found begins when my players enter to a battle area the other group players walk in fits and starts or with tumble manner and don´t follow well the main Player character, I don´t know is something is wrong in AI events or something in animation settings only my main player character (in this chase Samurai player) walks fine and I didn´t set AI settings for him. I´ll post 2 videos with my issues to show a better understanding what is happening with this 2 issues.




Below are my AI settings of my combatant main player and group:

AI_ settings Player
sube fotos



Best Regards
Post edited by berbelias on
  • edited November 2016
    The solution to the first problem depends on what you want to achieve. E.g. if dead group members are dead forever, you can enable Leave On Death in the combatant's death settings to automatically be removed from the player's group.
    If dead combatants should stay where they are, even when leaving the scene, you'll have to use the event system. E.g. store the combatant's position and the scene name into game variables and spawn a prefab at the position when reentering the scene (e.g. using global events using the Scene type). Would also require to remove the combatant from the group to prevent spawning in other scenes.

    The 2nd problem is handeld by the Move AI of the combatant. Try using thresholds in the move AI's settings (Group Settings for the follow leader setup).
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited November 2016
    gamingislove said: If dead combatants should stay where they are, even when leaving the scene, you'll have to use the event system. E.g. store the combatant's position and the scene name into game variables and spawn a prefab at the position when reentering the scene (e.g. using global events using the Scene type). Would also require removing the combatant from the group to prevent spawning in other scenes.
    Should I use then Change and Check Game Variables in death event and then I must set these game variables in Global Events? Or create a new event where I should set the combatant´s position and scene... for combatant´s position I must select search, check or spawn combatants nodes?
    Post edited by berbelias on
  • edited November 2016
    Use Change Game Variables in the death event to store the current scene name and position of the combatant into game variables.

    In a game event that is used by a global event you need to check if the current scene name is the stored scene name - if it is, spawn a prefab for your combatant at the stored position. The prefab could e.g. be a dead version of the combatant with another event that lets you revive him and rejoin the group.

    You'll need to use different variable keys for different combatants.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited December 2016
    I´m a bit lost with Game Variables anyway, I could post an image with my event. I think I should Add 2 Game Variables one for storing scene and another for the spawning Combatant, I should then add the modified death event in Global Events> Event settings and add 2 variable conditions there? or I must add these game variables in Spawn points and scene changers?. Should I use a Bool game variable to spawn the combatant´s dead prefab? for example?
    gamingislove said: The prefab could e.g. be a dead version of the combatant with another event that lets you revive him and rejoin the group.
    I must call these in dead event or must use a event interaction in scene? I don´t know how I must do it.
    Post edited by berbelias on
  • Combatant's Death Event
    In the combatant's death battle event, you'll store the current scene's name and the combatant's position into global variables:
    - use a Change Game Variables node to store the scene name (string variable using the Scene Name for the string value)
    - use a Transform To Variable node to store the position of the combatant's game object (will automatically be stored into a Vector3 variable)

    The variable key is up to you, but you'll need a separate key for each combatant (e.g. combatantA, combatantB, etc.) - you can store the scene name and position using the same key, since they're different value types (string and Vector3).

    Global Event
    The global event to check for spawning a dead combatant at the position uses a regular game event. Here, you'll check if the current scene name is stored in one of your combatant's death variables (e.g. combatantA, combatantB, etc.). If yes, spawn the appropriate prefab at the position stored in the variable and remove the game variable.
    - use a Check Scene node to check the current scene's name (use the Game Variable value type and the variable key of the combatant)
    - if Success, use a Spawn Prefab node to spawn it at the stored position (again, Game Variable value type using the variable key of the combatant)
    - after spawning, remove the combatant's game variables using a Change Game Variables node (having Remove enabled)

    The global event should use these settings:
    - set Event Type to Scene
    - disable In Old Scene and Before Fade
    - set Scene Change Type to All
    No variable conditions needed, as these things are checked in the event itself.
    Also, the event would do these checks for all possible combatants (i.e. the different variable keys, e.g. combatantA, combatantB, etc.).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited December 2016
    gamingislove said: - use a Change Game Variables node to store the scene name (string variable using the Scene Name for the string value)
    - use a Transform To Variable node to store the position of the combatant's game object (will automatically be stored into a Vector3 variable)
    How I must set up the Variable Key Value Type, I must select Value? or I must select Game Variable? and how I must set the Transform to Variable node settings?

    CHANGE GAME VARIABLES
    subir fotos



    TRANSFORM TO VARIABLE
    imagenes gratis



    I ask this because when I enter to one scene the combatant dead prefab still there but when I enter to another scene the prefab disappears as I show in the video below
    I found my prefab appears in another place of the scene and not in the place my combatant has dead before.
    APPEARS
    sube imagenes



    Post edited by berbelias on
  • edited December 2016
    I´ve tried the cast revive event and I´ve testing and found 2 possible solutions:

    - Revive via items, with an event, where player consume some revive potions, scrolls or similar item to revive dead player combatants although when my player dead again then I use item scroll regardless of I haven´t revive scrolls in my inventory and the reviving spell cast again how its happen in this video:

    -Revive via ability,I made an event with a dialogue where player must use a resurrection ability and spend some MP, if my player cancel to cast the spell the dead combatant prefab disappears (that´s because I´ve selected Deactivate after event) I believe I must add a destroy spawn node in event instead of this check, I´ve tried but the prefab doesn´t destroy.. I think there will be another solution.
    Post edited by berbelias on
  • It's up to what you want to do. E.g. if the combatant left the group, you could just join a new combatant in the revive event.

    Just check for the revive item (Has In Inventory node) and remove one from the inventory (Remove From Inventory node). Afterwards join a new combatant to the group (or whatever is needed for your revive).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • gamingislove said: It's up to what you want to do. E.g. if the combatant left the group, you could just join a new combatant in the revive event.

    Just check for the revive item (Has In Inventory node) and remove one from the inventory (Remove From Inventory node). Afterward join a new combatant to the group (or whatever is needed for your revive).
    Yes, I´ve solved the reviving event, that's ok and as I said I could do it via ability or via item.

    But I still have another issue with my dead combatant prefab. I´ve followed the steps you told me above to spawn the dead prefab and stand firm in his dead place when I change between scenes but when I change to another scene (in this case the second scene) the prefab suddenly disappears I´ll post another video to show you the issue. Otherwise I was testing and breaking my head trying changing the value key and value type In change variable and transform to variable nodes but the issue is still there, I don´t know which Value type I must select for these nodes as I said you before.

    PD: I was thinking to use an Object variables to track or keep a Object ID or use a variable event... but I don´t know I suppose are wrong steps in that chase I´ll show a video link with my Issue.




  • My bad - don't remove the variables after spawning the prefab, remove them after you've revived the combatant, i.e. in the event on the prefab.

    As for the value type - that depends on what you're doing. Usually, you'll use the Value value type to directly define what you need. E.g. when using variable keys, you'll want to directly define the key, i.e. use the Value value type. The Game Variable value type would look for a value in the defined game variable.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.