Grapple (Collided with solid not working properly)

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
User avatar
kaliam
Member
 
Joined: Thu Feb 04, 2016 2:51 pm

Grapple (Collided with solid not working properly)

Postby kaliam » Tue Jul 05, 2016 3:14 am

Hello! So I am currently developing a grapple swing for my infinite side scroller (Front View), I am using an actor as my grapple so that when it collides with an object I can memorize it's position and create a new actor that handles all of the swinging motion.

The grapple is programmed to shoot wherever you click/touch on the screen. I used push nodes in order to get the grapple to move toward the cursor's location correctly, I did this because I wasn't able to get the actor to travel at an angle any other way. The graphics rotate properly but the object always goes strait no matter how it was moved.

Now here's the problem, I'm using a trigger in the actor template of the grapple to detect when it has collided with a solid object. However, when I shoot it against a wall or another actor (using the push nodes) it won't register a hit. It does detect the collision if I shoot it into a corner (touching two faces that prevent it from sliding or moving) but otherwise it just slides along the surface it made contact with.

Note: The collision works fine if I move the object using velocity.

So what i'm asking is:
How can I program an actor to move and face towards the cursor like a projectile and have it detect when it Collides with something solid.

Thanks all for the help!

User avatar
Kilatorian
001 Support
 
Joined: Sat Oct 18, 2014 12:11 am
Location: Planet Earth

Re: Grapple (Collided with solid not working properly)

Postby Kilatorian » Tue Jul 05, 2016 5:18 pm

I did something similar awhile ago, never quite finished it as I determined it wasn't really necessary for my game.

You'll need to use Change Aim/Look Angle Y event right before a Start Using Equipment event in whatever button you use to shoot your grapple. You'll also use the use values for the Cursor: TargetXofY, and TargetZofY.

Example change aim/look angle event, angle:
Code: Select all
Geometry.DirectionY(Cursor.TargetXofY(Actor("main").Y),Actor("main").Y,Cursor.TargetZofY(Actor("main").Y),Actor("main").X,Actor("main").Y,Actor("main").Z+20)*-1


Have you tried using a Stop Push/Slide event in your collide with solid trigger? You might also have to go into Legacy Settings and uncheck "Disable "Touched Solid" trigger for negative z-axis".

Here's my script on how I did it with velocity, hopefully this provides some insight.

User avatar
kaliam
Member
 
Joined: Thu Feb 04, 2016 2:51 pm

Re: Grapple (Collided with solid not working properly)

Postby kaliam » Tue Jul 05, 2016 9:58 pm

Kilatorian wrote:I did something similar awhile ago, never quite finished it as I determined it wasn't really necessary for my game.

You'll need to use Change Aim/Look Angle Y event right before a Start Using Equipment event in whatever button you use to shoot your grapple. You'll also use the use values for the Cursor: TargetXofY, and TargetZofY.

Example change aim/look angle event, angle:
Code: Select all
Geometry.DirectionY(Cursor.TargetXofY(Actor("main").Y),Actor("main").Y,Cursor.TargetZofY(Actor("main").Y),Actor("main").X,Actor("main").Y,Actor("main").Z+20)*-1


Have you tried using a Stop Push/Slide event in your collide with solid trigger? You might also have to go into Legacy Settings and uncheck "Disable "Touched Solid" trigger for negative z-axis".



Thank you soooo much, turns out the only thing that was messing me up was the Legacy setting. I probably spent 4 hours trying to figure this out before I finally decided to ask. That velocity system is pretty amazing, it's a bit complex for me right now though. What I've made works great now thanks to your help! :D

Cheers!

PS: I'd love to know how to post scripts like that ;)

User avatar
RamchuK_Ntertainment
Ultimate 001 Member
 
Joined: Tue Sep 29, 2009 10:50 pm
Location: Seattle, Washington

Re: Grapple (Collided with solid not working properly)

Postby RamchuK_Ntertainment » Wed Jul 06, 2016 1:47 am

Scripting Window > Script (Upper Left-Hand Corner) > Share Script > Forum phpBB Code

Copy and paste the provided code anywhere on the forums to make it available in visual format, or post the URL to link viewers to a web view.
Travesty: 3D Survival - WIP >>> Forum Topic
University of Washington (BABA)
-REGT- Ramchuk Entertainment Games Team
Strategy/Action/Adventure
Copyrighted©2008-2017


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron