Jump to content
Aveyond Studios Community
  • 0
Guille

Make Projectiles and hit player 2D RPG

Question

I just installed it !, I already made it move in 4 directions and the camera follows it as I wanted, now I would like it to be able to shoot. I did similar to YouTube video for FPS but it does not work. Any idea where to go? I feel a little lost but soon I will understand.

image.thumb.png.d8fdc6bf6f741f657ea846bde0d62321.png

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

@Guille, I have looked into this issue. I thought I had a 2D action set up for this, but I don't. This is what is going to happen: I'm going to put my focus on getting this action to you as quickly as possible. Guesstimate completion time: two days. I'll upload the action here + a few related actions that also need to be added. This is what to expect:

  • Get Hero Object by Ray 2D
  • Filter Hero Objects by Collision 2D
  • Filter Hero Objects by Trigger Area 2D

Also, the original actions will be renamed in the next version of HeroKit:

  • Get Hero Object by Ray 3D
  • Filter Hero Objects by Collision 3D
  • Filter Hero Objects by Trigger Area 3D

Good detective work!

Share this post


Link to post
Share on other sites
  • 0

I'll wait, do not worry, as I move forward with the animations of the game. In another post I commented on a problem when adding an item to the inventory, there is a big dropframe. Thanks!

Share this post


Link to post
Share on other sites
  • 0

How long does it take to update the Assetstore store? If I sent you the purchase receipt, would you send me the new version by mail to go testing? Thank you!

Share this post


Link to post
Share on other sites
  • 0
6 minutes ago, Ant said:

It should be up now. Can you check? It usually takes 2-4 business days for Unity to turn asset updates live.

Yes I have the update! Thanks! I have some issue with ray2D I made a thread in the bug section

Share this post


Link to post
Share on other sites
  • 0

He don't hit the hero object and don't save it. Also, always when I press space I have this error, and.. is normal the old ray keep on when I press space in other place? Thanks

NullReferenceException: Object reference not set to an instance of an object
HeroKit.Scene.ActionField.HeroObjectFieldValue.SetValueB (HeroKit.Scene.HeroKitObject heroKitObject, Int32 actionFieldID, System.Collections.Generic.List`1 newValue) (at Assets/HeroKit/Hero Engine/Framework/3. Hero Actions/Scene/Fields/HeroObjectFieldValue.cs:496)
HeroKit.Scene.Actions.HeroActionCommonRuntime.AssignObjectsToList (HeroKit.Scene.HeroKitObject heroKitObject, Int32 actionFieldID, System.Collections.Generic.List`1 items, Int32 actionType) (at Assets/HeroKit/Hero Engine/Framework/4. Hero Common/Data/HeroActionCommonRuntime.cs:111)
HeroKit.Scene.Actions.GetHeroObjectByRay2D.Execute (HeroKit.Scene.HeroKitObject hko) (at Assets/HeroKit/Hero Engine/Actions/Core/Scene Objects/Get Hero Objects/Get Hero Objects By Ray 2D/GetHeroObjectByRay2D.cs:88)
HeroKit.Scene.HeroKitObject.ExecuteAction (Int32 eventID, Int32 actionID) (at Assets/HeroKit/Hero Engine/Framework/1. Hero Objects/Scene/HeroKitObject.cs:849)
HeroKit.Scene.HeroKitObject.PlayActions (Int32 eventID) (at Assets/HeroKit/Hero Engine/Framework/1. Hero Objects/Scene/HeroKitObject.cs:813)
HeroKit.Scene.HeroKitObject.PlayEvent (Int32 eventID, UnityEngine.GameObject messenger, Boolean useConditions, Int32 eventType, Int32 messageID) (at Assets/HeroKit/Hero Engine/Framework/1. Hero Objects/Scene/HeroKitObject.cs:762)
HeroKit.Scene.HeroKitObject.PlayEvents (Int32 eventType, Boolean useConditions, Int32 messageID, UnityEngine.GameObject messenger) (at Assets/HeroKit/Hero Engine/Framework/1. Hero Objects/Scene/HeroKitObject.cs:724)
HeroKit.Scene.HeroKitObject.Actions_Run_When_Key_Pressed () (at Assets/HeroKit/Hero Engine/Framework/1. Hero Objects/Scene/HeroKitObject.cs:533)
HeroKit.Scene.HeroKitObject.Update () (at Assets/HeroKit/Hero Engine/Framework/1. Hero Objects/Scene/HeroKitObject.cs:147)
 

Captura de pantalla 2018-05-15 a la(s) 01.03.39.png

Captura de pantalla 2018-05-15 a la(s) 01.04.39.png

Share this post


Link to post
Share on other sites
  • 0

Take a close look at the section called “Save the hero objects here.” It looks like you are trying to save the hero object you’ve hit into a variable that doesn’t exist. 

Tweak this and everything should run fine.

I’ll add some clearer error handling for this.

Share this post


Link to post
Share on other sites
  • 0
6 minutes ago, Ant said:

Take a close look at the section called “Save the hero objects here.” It looks like you are trying to save the hero object you’ve hit into a variable that doesn’t exist. 

Tweak this and everything should run fine.

I’ll add some clearer error handling for this.

 

It work! my bad is to late today! thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×