HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: 1 [2]

Author Topic: [Resolved] Scripting a combat system  (Read 5694 times)

Gassy_the_Goblin

  • World Owners
  • ****
  • Posts: 20
    • View Profile
    • joshpurple.com
Re: Scripting a combat system
« Reply #15 on: Oct 08, 13, 11:22:02 PM »

Thank You Keeper of Stars :) !

This is for an MMO, where the need is for showcasing a combat between a human (peasant with sword & possibly a shield, -the player character) vs. a monster (multi-legged NPC*, not using any weapon).   I have rigged, animated, and exported both models, adding your clean (awesome  :D ) scripts to them, & they are successfully working as NPCs in the HE (static characters).

I was thinking it might work where I would replace the Monkeytok with the monster, and replace the Ranger/Wizard character with the peasant character (I'm such a newbie, sorry ) .

I'll test the characters in my HeroBlade server (default set-up), then I send the models to the dev team, and they load them into the maps/areas they have created on their server, -where they would like to do the screen capture of the combat.

*If possible, having the monster available as a player character would be best, -so the showcasing of the combat would allow for player control of both units.  My understanding is, the monsters will be NPC units in the game, but they will want GMs to be able to control the monsters when desired.

This is currently a very short term goal, with the specific desire of screen capturing the combat between the player and the monster (ideally both units being controlled for the combat).  There is a great deal of game design to be worked out yet, -where my role has been in providing character/npc/monster models, animations, & (hopefully now) providing working/playable characters.

Just learning of the Mutable & Immutable Data types, your advice for saving on resources makes complete sense.  I'm sure it's pretty obvious I should be spending my time on learning basic scripting, where I'm trying to understand (for example) Thazager's Advanced scripting Dev Tut.  I don't mean to 'dive' into Advanced Scripting, I think it's due to my background in character modeling, animation, max script, etc. that I end-up being in the position of diving into the character creation system.

And Thank You for the link to Thazager's Dev Tut on 'Character Selection - basic.'  Great tut/thread, and Thazager = outstanding , I deeply appreciate the time and work given for providing the great tuts :) .

Hope I'm making sense .
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Scripting a combat system
« Reply #16 on: Oct 09, 13, 07:49:47 AM »

If your main focus is to stage a fight scene to help draw up interest / have kickstarter material, then just do some dirty coding for now.

Setup a cheap light weight combat script that takes player input, if you don't want to do gui layer yet.
The just script it up in the client Input to check for lets say key press 1 = pass autoAttack down to your attack script.
In it just have a timer started, that on the tick plays the players attack animation and then raycast from your weapon to see if it hit the enemy.
if pressing 2, pause the timer from auto attack if it's running, then animate ice ball FX to play the spell / send it to the target, we will just let it auto track for simplicity. after fx unpause autoAttack.

Repeat for your options.

In regards to npc, and taking control by default the base player controller lets you take control of any npc. So the next part is taking that input and mapping it differently based on player vs npc and which npc you have.

Now the above is a very dirty and highly ineffective method, but it will get you to your short term goal, without wasting too much time or engery. It also covers some aspects you will need to deal with when building out your full version later on. But please don't use it and think well that was easy and it works, cause when you start trying to make it work for a large scale system. It will bomb out.

There are a ton of things to think about when you build out a combat system most people completely overlook until they have written a ton of code and start performance testing to find it doesn't work.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Gassy_the_Goblin

  • World Owners
  • ****
  • Posts: 20
    • View Profile
    • joshpurple.com
Re: Scripting a combat system
« Reply #17 on: Oct 09, 13, 02:45:37 PM »

I can't Thank You enough Keeper of Stars  ;D !    Glad to get your advice, -it is sincerely appreciated :)  !
Logged
Pages: 1 [2]