|
Post by AppThing on Jun 3, 2014 7:58:45 GMT
Hi, I am in the middle of creating a game using your awesome Core GameKit and am looking for advice on he best practise to use your killable script.
I have a 3rd person perspective game where a spawner releases enemy characters who then follows the player until they get in melee range. at which point the enemies begin a melee attack animation (sword or axe swing). what i am unsure about is the best method to use to resolve the attack. do I;
1) project a gameobject out short distance with a killable script attached (visible or non visible) and then forget about and leave the Killable script to do the work? or 2) script an attack (e.g. raycast or just animation timed)?
Just looking for other peoples experience on the best practice to use?
many thanks.
|
|
|
Post by DarkTonic Dev on Jun 3, 2014 8:02:43 GMT
No idea what others have done. I myself was about to try:
1) Show the animation. 2) Spawn a Killable with no motion on it. 3) Put a Timed Despawner on the Killable as well with a very quick despawn timer in case you hit nothing.
You shouldn't need any ray casting.
|
|
|
Post by AppThing on Jun 3, 2014 8:09:06 GMT
great thanks,
does the new gameobject need to have a renderer? I recall reading it needs a collider and one of the items to have gravity, but can I make it "invisible"?
|
|
|
Post by AppThing on Jun 3, 2014 10:46:33 GMT
Another quick one (hopefully).
I add a Triggered Spawner script and set to Collision Event and Trigger Enter to spawn a sphere as my test Melee Attack (Killable) Object. However it either triggers once (when the enemy collides with my Player) or if i set to repeat it continues endlessly (even after my player has run away).
Is their a way of starting the Spawning based on a distance away and then stopping (if its set to endless) when not in range?
thanks.
Also I tripped across these forums by accident using google, (no reference in Docs or Youtube videos) is this the best place to ask these questions or is their another forum elsewhere?
|
|
|
Post by DarkTonic Dev on Jun 3, 2014 23:48:17 GMT
great thanks, does the new gameobject need to have a renderer? I recall reading it needs a collider and one of the items to have gravity, but can I make it "invisible"? About the renderer, I believe it can have no renderer as long as you don't have "ignore offscreen hits" checked.
|
|
|
Post by DarkTonic Dev on Jun 3, 2014 23:53:09 GMT
Another quick one (hopefully). I add a Triggered Spawner script and set to Collision Event and Trigger Enter to spawn a sphere as my test Melee Attack (Killable) Object. However it either triggers once (when the enemy collides with my Player) or if i set to repeat it continues endlessly (even after my player has run away). Is their a way of starting the Spawning based on a distance away and then stopping (if its set to endless) when not in range? thanks. Also I tripped across these forums by accident using google, (no reference in Docs or Youtube videos) is this the best place to ask these questions or is their another forum elsewhere? There's no way to do what you want without code. You could try making a subclass of Triggered Spawner and calling the EndWave method when your custom logic is satisfied. Although I haven't really made a subclass of Triggered Spawner before. It's possible it might be a couple tweaks. There is a link to this forum in the newest ReadMe doc file and PDF, I might have added it a little later.
|
|
|
Post by AppThing on Jun 4, 2014 8:42:56 GMT
Ok Thanks,
I am trying to create a subclass, I want to add a Player Target in Range check, I have most of the code, but what is the best method to call to start the wave when the Player object come in range?
|
|
|
Post by AppThing on Jun 4, 2014 8:56:03 GMT
Ok Thanks, I am trying to create a subclass, I want to add a Player Target in Range check, I have most of the code, but what is the best method to call to start the wave when the Player object come in range? ignore that question, i just found: ActivateCodeTriggeredEvent1(); :-)
|
|
|
Post by DarkTonic Dev on Jun 4, 2014 15:59:24 GMT
Yep. That's the one.
|
|