playMaker

Poll

Can any gentleman on this board can help me making one from scratch?

help
1 (50%)
help
1 (50%)

Total Members Voted: 2

Author Topic: Auto Turret with Switching targets  (Read 7177 times)

NUVI

  • Playmaker Newbie
  • *
  • Posts: 8
Auto Turret with Switching targets
« on: July 05, 2012, 03:55:01 PM »
I could make the turret shot a single target but when a new target appears y just doesnt work. And I just cant make it wright!

 ??? ???
 a little help please!!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Auto Turret with Switching targets
« Reply #1 on: July 06, 2012, 03:06:08 AM »
Hi,

 it's going to be difficult to help you without a bit more information. Are you using a framework for your turret system?

bye,

 Jean

NUVI

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Auto Turret with Switching targets
« Reply #2 on: July 09, 2012, 02:28:19 PM »
Yippie !!! help!

Hi! thanks a lot for replying my post. so let me explain the hole concept.

I am designing an iphone-ipad game. A battleship style war game which you take control over a battle destroyer. making the ship controls, enemies, scenarios, etc, proved no challenge. However I have no idea of how to make a simple turret work properly ( search enemies- target them- shoot them and finally, restart the same process, in other words, make a turret switch enemies. Now, with this info I can adapt the process to many other situations like the next one:

in image 1 is the overall situation. Ship controls, as you noticed I put an auto turret which will shot at incoming enemy missiles. in the next post I`ll continue the explanation

NUVI

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Auto Turret with Switching targets
« Reply #3 on: July 09, 2012, 02:35:36 PM »
I used raycasting exactly as the video tutorials and it works just well, when the rocket (experimental box ;D) enters a firing range the auto turrets search it and engage it. Thats well learned! now the real problem is that I dont know how to make it engage one after another, what I mean is that it cannot engage a prefab or at least I dont know how.

NUVI

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Auto Turret with Switching targets
« Reply #4 on: July 09, 2012, 02:43:47 PM »
So this is the hole idea and I cant figure it out. I have very little experience in this programming playmaker and in game development too! So I will be very grateful to listen a step by step explanation of how to achieve this. This is a great step to all of us since we all need a good working turret function. I am willing to help all users of this forum too with my little experience in all that I can.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Auto Turret with Switching targets
« Reply #5 on: July 10, 2012, 03:27:35 AM »
Hi,

 ok. I have a deal with path-o-logical, that I am going to port their targeting system to playmaker as soon as I can.

http://targetpro.path-o-logical.com/

Have a look, if you can afford that, I think your whole game will get a real boost! it's basically answering your needs.

 Now if you want to make it without any third party:

What do you mean "I cannot engage a prefab"? a prefab in the scene is just like any other gameObjects, so if you fire a raycast, it will pick prefabs if they match the raycast set up ( tag, distance, direction, etc)

for firing range, I am not sure where and if you use raycast but I would rather choose triggers. How do you detect that an ennemy missile is in range? I would just make a sphere collider set to "trigger" put an fsm on that sphere collider gameObject, and react to gamObject that enters with a specific tag say "ennemy missile" and then lock my turret to it.

 One issue you will have is when several missile are triggering, you will need to keep track of them in a list somehow I guess. For this use ArrayMaker, this is a tool I wrote specifically for playmaker that will allow you to store information in arrays and hash tables and work with them.

https://hutonggames.fogbugz.com/default.asp?W715


let's take it from there, and progress so you can have a working system.


Bye,

 Jean

NUVI

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Auto Turret with Switching targets
« Reply #6 on: July 11, 2012, 11:24:51 PM »
Hi Jean!

First of all I appreciate your attention and Help a lot, thank you.

I checked out the targeting system that you recommend and it just look perfect, the price is fair and seems very attractive. The real problem is that I believe that other third party applications should be replaced with a single global solution, for me was the main reason to purchase playmaker. I am very interested in hearing your sphere collider solution. In anyways I could help you feel free to ask. Ill post a picture of the process. I already make the turret find and destroy the incoming missiles but I cant make it target a new incoming missile, in the worst case scenario Ill just leave one incoming missile per mission and make kind of a "fake sensation  ;D ;D" of being protected.

Ill hope help arrive  ::)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Auto Turret with Switching targets
« Reply #7 on: July 12, 2012, 02:47:24 AM »
Hi,

One global solution is almost impossible to approach, the specifications for each are so different that we should indeed embrace the ability to plug frameworks and tools that fit our needs. This where the important work is to be done prior doing anything yourself: study and survey what's happening on the asset store and in forums to not reinvent the wheel. It's always very difficult to commit to a particular tool, because it might not be 100% what you want, etc etc. This is actually the most difficult part when starting something, choosing the right tools for the tasks.

 I for example create simulators, scientific and technical applications far from games requirements, Unity, playmaker and other frameworks are the common denominator, tho the work produce is totally different, so in a sense I think we have our global system, and playmaker is perfectly positioned in between all these different possibilities, and that's why making custom actions for other tools is so great, because then you can take the direction you want yet still using playmaker.

If you start with targetPro, do not hesitate to come back here and ask for playmaker actions to do this and that. I have started studying TargetPro myself, so I hope to find the time to make custom actions soon.


 bye,

 Jean

Mark_T

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 72
Re: Auto Turret with Switching targets
« Reply #8 on: July 12, 2012, 03:45:10 PM »
I think we have our global system, and playmaker is perfectly positioned in between all these different possibilities, and that's why making custom actions for other tools is so great, because then you can take the direction you want yet still using playmaker.

Quoted for agreement. :)

...... to not reinvent the wheel.

That`s a good point.

If you start with targetPro, do not hesitate to come back here and ask for playmaker actions to do this and that. I have started studying TargetPro myself, so I hope to find the time to make custom actions soon.

I tried my own solutions but I had to do all kinds of workarounds, and I`m sure far far less efficient compared to TargetPRO. :) Not to mention a lot less capable too.

I`m really looking forward to the TargetPRO actions.
Jean, a big THANK YOU in advance!