edited February 2014 in ORK Support
Hey Gil. I couldn't come up with a solution on this. I was hoping to see if you have one.
I set up a bool variable name campfire to false and attach it to the prefab campfire.
I also set up a trigger enter and trigger exit event on it. It works perfect. On trigger enter, my bool is set to true and on trigger exit, it's set to false.

Here's the problem.
I set up so that my item will only work if the variable campfire is set to true. (If I'm right beside the campfire.) If I'm outside of the campfire's trigger range, I won't be able to use the item anymore. Good. BUT if I'm right beside the campfire when the campfire's time is out and the prefab is destroy, my bool campfire will still be true, and thus I can still use the item. (Because I have not exit the trigger, to make the variable false)

I already try going into my spawn prefab campfire event and set up the variable campfire to false when the prefab is destroy. That works, but than I won't be able to create more than one campfire at a time anymore. (Because I have to wait until the campfire is destroy to set the variable to false, and this create the problem of having to wait until the campfire is destroy to create a new campfire)

I don't want to be limited to only having one campfire prefab spawn at a time.
Post edited by gamingislove on
  • I see the problem - a solution could be by checking the distance to the player when destroying the campfire. If the player is within range, change the 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!
  • edited February 2014
    Ah thanks, I'll give that a try when I'm at home.
    And hey GiL, what do you have to do so that the shooting spawn prefab will do damage?
    I made it so that when I'm equipping a gun and pressing the attack button, bullets will come flying out shooting at an enemey. But the bullets do no damage at all. They just went through the enemies and went on their merry journey. I already added a damage dealer to the bullet, still won't work.
    Post edited by Shadow_Fire on
  • You have to activate damage dealers in a battle event for the ability; as noted in the tutorials.
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • Oh, can you tell me which part of the tutorials that is in? Because I went to relook at the tutorials, but coudn't find a way to make a spawning moving prefab do damages. Note, I can make a sword do damages, just not the bullets.
  • Hmm, the workflow for moving prefab damage dealers shouldn't really differ that much. It *shouldn't* make a difference; but I've had some trouble with them as well. (you can check out my thread located here that I posted a day or two ago.

    But that issue is very location dependent, I can generally make projectile deal damage if I spawn the prefab on top of an enemy damage zone. If you're having trouble making the damage dealer do damage at all, the issue is likely with your event. Double-check to sure that the prefab's damage dealer is being correctly activated, and that the ability or tag settings in the damage dealer prefab are set correctly.
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • The damage dealer/zone game tutorial can be found here. Some basic knowledge on them (and how they can be activated) can be found in this how-to.

    Like Kirb said, you need to activate the damage dealer in the ability's game event after spawning the prefab. Also, you need to set up the damage dealer correctly, e.g. seems like you should use the Collision Enter type. Also, don't forget that your combatants also need Damage Zones attached to them, else they wont receive the damage :)
    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 February 2014
    Thanks for the tips, GiL and Kirby. Kirby, I hope you find a way to solve your problem :)
    I checked, and everything seems to be in place. Here's what I did exactly. First I created an item call Bullet. On the bullet Damage Dealer setting, I add in a tag call weapon and edit the Target Changes. On the bullet prefab itself I added in a Damage Dealer of type Collision Enter with the activation tag weapon. I edited the Target Changes to make enemies lose HP.
    Then I created a gun weapon and on the Attack Setting for the ability section I put in my ability "Gun Attack". Then in my "Gun Attack" ability, for the Animation Setting, I added a battle event which just basically check to see if I have bullets in my inventory, and if I do, to spawn the bullet and shoot it (move it to a child object of the player that is far away). I also edited the Target Changes to make the enemies lose HP.
    This IS the correct way to make a gun shoot bullets, right? Or am I missing some steps? I know it's not the enemies damage Zones because when I switched to a sword, I can damage them.
    Post edited by Shadow_Fire on
  • Projectiles (i.e. stuff you spawn in the battle event) wont get automatically activated, so you need to use an Activate Damage Dealer step on your spawned projectile.
    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 February 2014
    I tried that, but still not inflicting damages to the enemies. I want the bullets to hit the enemies and disappear, but instead it just went through them not causing anything. I also tried tweaking other stuffs, and trying to see where I went wrong, but I can't figure it out.
    Post edited by Shadow_Fire on
  • The damage dealers on the combatants need to have a collider that's not a trigger on them - else they have nothing to collide with.
    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 February 2014
    Ah, my mistake. Turns out the Is Trigger box was enabled.
    Just got one more question. I notice there is something weird about the enemies attacking and moving around. If I'm in front of the enemies and they are attacking me, the moment I move away, instead of chasing me instantly, they'll make a full 360 turn first before chasing.
    And when they chase, sometime the run animations aren't playing, instead it'll be the walk animation. They are still going the speed of the run movement, but with the walk animations instead. Do you know what's wrong?
    Post edited by Shadow_Fire on
  • I'd need your project/settings to see what's going 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!
  • Send you the project :)
  • As mentioned in the email: small (idiotic) bug :D
    You can bypass this by using Target Position Check intervals above 0, e.g. 0.01 - the update time check in the move AI is wrong (checking time > 0 instead of time >= 0), will be fixed in ORK 2.0.3
    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!
  • Thanks GiL! That solve the 360 turning. But I notice that sometime the walk animation will still be playing instead of the run. Is this also related to the Target Position Check bug?
Sign In or Register to comment.