Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

combat

I need a new combay system,my current one is very basic.
  i want a combat which can have diffrent weapons that do different damages.
Am using sugercane.

Comments

  • Okay, here's what I know.
    To start, your going to want a hitting parameter, which is going to be defined by your level of skill in, say it's a sword, Melee Weapons, and a random number between X and Y. for the purposes of this tutorial, X is going to be 1, and Y will be 20.

    To start the number generator, use this-
    <<set $dice to random(1, 20)>> You roll a <<print $dice>>
    Now, Add in the multiple options of what may happen when you play.
    <<if $dice gte $meleeSkill >> You hit! You deal <<print $dice - ($meleeSkil +weapondamage)>>damage <<set $enemyHealth -= $dice -(meleeSkill + $weaponDamage)>> <<endif>>
    <<if $dice lte $meleeSkill>> You miss!
    If your skill was 10 and the dice rolled an 11, you'd deal 1 damage. If your skill was 9, you'd deal two. At the start, set your skill level to about 2/3 of Y (max number dice can be) and then give the player the chance to add skill levels to certain things, e.g. crafting, engineering, parkour etc.
    Then, you'll want to have the continue option or the enemy turn, if they live.
    <<if $enemy health lte 1>> The mutant thingy dies [[Continue]]<<else>> The mutant thing attacks! [[Oh Noes!]] <<endif>>
    Then, choose your enemies skill level and set up the same kind of system for them.
  • will try this out thanks
  • but how would i go about "creating" different weapons??
  • i tried using your object thing to make a gun it does not work..

    this is what i have at the moment:

    <<set $gun = {}>>

    <<set $G98 = {
        name: "G98",
        max ammo: 5,
        ammo: 5,
        caliber: 7.62,
        damage: 7,
    }>>

    <<set $gun = $G98>>

    and it tells me that its a bad expession??
  • You have a space in the "max ammo" property. It needs to be one word. I copy and pasted your code, fixed that, and it worked.
  • have got rid of the spasce and it still says bad expression????
  • I fixed it!  :) :) :) :) seems i had forgotten a comma after the  "G98" part.
Sign In or Register to comment.