• You can have a component on any game object in your scene and access it via an actor (or searching for game objects). It'd probably be easier to advice you if I know your use case :)
    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!
  • I want to have a unique custom ID for some weapons, which I declare it via a script in the prefab of the weapon right now for the drops etc. but I want to access this ID from events via select weapon choice for example and get this selected data ID, when no prefab is spawned. This is my main case, because if I have this unique ID in the time of the event so I can use it on my custom scripts I can do the rest the way you describe it or in the event itself I think.
  • Hm, is the custom ID based on something of the weapon or generated without it?

    Generally, it's probably easier to call a static function, so you don't need to have a component attached to any game object and can access it anytime. E.g. use a Function To Variable node to store the custom ID into a variable, your function would return the new custom ID, as long as it's a string, bool, int, float or Vector3 value.

    I could add a setting to call a game event upon instantiation (like the current equip/unequip events), so that your custom IDs are generated upon instantiation.
    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!
  • this custom ID is generatedseparetely from the weapon and can some times change with custom scripting too.

    You mean when the weapon is chosen by selected data choise node to instantiate the prefab?
  • Calling a static function means that you don't have to instantiate the prefab to access the script.

    Ah, sorry, I wrote that a bit misleading - I meant upon creating an instance of the equipment, not instantiating the prefab. Basically, you'd be able to run an event whenever a new weapon is created (e.g. added to a shop or inventory or dropped by an enemy, or even the start equipment of a combatant). The event can call your custom (static) function to generate the key and set it as a variable of the equipment (which is available via the action selected data key).
    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 March 2019
    ah yes this event when prefab is instantiated would be handful and I think it solves my issues. Thank you :)
    Post edited by dlevel on
  • edited April 2019
    So I run a death event for my enemies, and when 1 dies if more are spawned around, they stop chasing me for 1-2" (until the death event of the other enemy finishes). do they share something and this happens?
    Post edited by dlevel on
  • Hm, is the death event blocking the move AI?
    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!
  • ah yeah, so the enemies share the shame move AI so it blocks it. ok understood :) thanks
  • edited April 2019
    Move AI can be blocked for the individual combatants OR all combatants. If you only want to block for the user and block it for all by mistake, that's what you get :D

    So, make sure to use Block Actor Move AI instead of Block Move AI in the event settings. Or even better, use a Block Move AI node using the user actor in that case. The Block Actor Move AI setting will block the move AI of all actors of the event, which also includes other combatants in case of the death event (usually those that attacked the combatant).
    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!
  • much better :D thanks
  • edited April 2019
    85) I'm finding myself using events more and more, and now I don't use combatant spawners components that much, I use the event system. What I'm missing is 2 nodes: Remember Combatant (for the Spawn Combatant node) and Despawn Combatant (when again, not using Spawner Combatant component). Is there any chance you include them at some point? or any other way to do that? I find it much easier now to handle variables/spawn positions etc. inside the event instead of the spawner.
    Post edited by dlevel on
  • 85) Currently not - remembering combatants in that way is currently bound to the combatant spawners.
    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 April 2019
    An old unsolved question:

    60) I cannot make the Follower Auto Respawn in Move AI work, it follows me (leader) just fine but when I get out of range it doesnt respawn near me.

    your answer was:

    60) Make sure your battle ranges are high enough (or disabled) in Battle System > Battle Settings. E.g. if the move AI range is less than the respawn range, it's probably not going to respawn :)



    The move AI range is more than the respawn range but still the npc that follows me (without any problem) doesn't respawn when I get out of respawn range, even tried very low respawn ranges just for testing (5 range)
    Post edited by dlevel on
  • Hm, working fine here - you know the drill, send me a small Unity test project where it happens :)
    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.