HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Weaponizing the Environment  (Read 1264 times)

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
[Resolved] Weaponizing the Environment
« on: Dec 11, 12, 08:27:05 PM »

Hi everyone,

As the project that we're working on is based on the comic book genre, we're looking at ways to weaponize parts of the environment, as picking up and throwing objects such as crates, streelights or even cars are a common feature of many superpowered battles - so we're wondering how to achieve this with the Hero Engine.
Some objects in zones and on mission maps would need to be able to be picked up by a player, carried, and then thrown as a ranged attack, which seems like it'd be quite a bit more complex than scripting normal attacks - so where should we start when it comes to finding a way to script this sort of power?
« Last Edit: Dec 21, 12, 11:15:04 AM by HE-Cooper »
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Weaponizing the Environment
« Reply #1 on: Dec 14, 12, 09:41:10 PM »

I'll assume you have an equipment setup, where you click on your inventory and it equips a weapon. If my assumption is correct, couldn't you script the items you want players to pick up just as if they were a weapon that goes into your characters equipment slot. Then for attacks you just script the base action out, toss, throw, swing, etc. Create a gui for when you run to the crate it offers ability to pick it up and equip. Now problems i can think off right off bat is the persistance of the object now being tied to player then not being tied to player. Would need to delete the instance on pick up and recreate it on toss.

Or another possible way would to make them stateful on pickup change state call a script to tie it to the players hand, on toss change state to being thrown, apply a FX to animate it, apply a damage value of it (perhaps from character stats) and check for it's collision with player, once fx is over, set state to normal, or blow it up or smash it whatever you want.

Personally I would think about treating them as weapons that can be equiped and thrown. Assuming you have the weapon swap on new item equip you instantly get position with bones worked out, animation with characters arm / movement, can easily treat it like a sword basically and give it abilities, apply player stats, keep track of it via your character movement etc, just like it was a weapon.

I'm sure there are otherways to approach it and some might be more effective and I just don't know it yet, still learning this engine, but have wrote games in several other engines, and that is the direction I usually take, as far as treating the items like weapons.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Weaponizing the Environment
« Reply #2 on: Dec 15, 12, 07:53:40 PM »

Thanks for the reply - I was thinking that something like this might be the solution.

Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: [Resolved] Weaponizing the Environment
« Reply #3 on: Dec 21, 12, 11:15:48 AM »

This would really depend on how your engineers are implementing your combat system and character controller, but you'll also most likely want to investigate the concept of props and prop buckets.
Logged