Help me make them fight

Hello im working on a hack&slash game and im starting to learn combat mechanics so i have a few question

-how do you set a certain amount of hitpoints to an actor

-how do you set the damage an actor can do

-is it possible to make an actor begin to fight when in range and if yes how to ?

-is it possible to set an "agro" range for the monsters actor and if yes how to ?

Thx

Comments

  • dwibredwibre Member Posts: 192
    For hit points make an attribute lets say 6 create a rule that says every time actor is "hit" -1 from the attribute. In the rule add another rule that says if attribute = 0 distroy actor.

    For damage just amend the above -2 for bigger punch etc.

    Yes it is posible to create a fight range, create a rule that says if hero is + or - let say 100 of enemy, enemy fight = true otherwise enemy fight = false.

    The same goes for agro
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Demsay I recommend starting with video tutorials that will help you understand how attributes work in GameSalad. If you click the link in my signature, you can view a series of videos that will take you from start to finish to develop a basic game. It includes explanations of how attributes work, how you change them, how you check when they are a certain value, etc.

    For information about "range," try Googling gamesalad magnitude.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • DemsayDemsay Member Posts: 6
    Thx dwibre for your help.

    Now im looking for a way to make my main actor move where the screen is touched.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Demsay It seems you ignored my advice, which is okay (to each his own) but you're going to find that learning the basics first and then asking questions is probably a better way to use GameSalad. I don't know about @dwibre or anyone else, but I don't have the energy to explain each basic element of GameSalad... especially when my videos already provide that instruction. If you watch the videos and then have specific questions (e.g. "I added a When Touch is Pressed rule and an Interpolate behavior but now my actors' collision rules aren't working. I noticed that when I replace the Interpolate with a Move behavior, the collision rules work. Why is that?"), these forums are a great place to get additional help.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • DemsayDemsay Member Posts: 6
    Im sorry tatiang i didnt see your first comment. Im gonna look a these videos
  • DemsayDemsay Member Posts: 6
    Im sorry but i cant find the move where touch for windows...
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Demsay Granted, Windows Creator is a bit different from Mac Creator. Perhaps you should start with http://gshelper.com/?p=1537 or with the Windows Cookbook Tutorials and Templates here: http://cookbook.gamesalad.com/tutorials.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • DemsayDemsay Member Posts: 6
    edited February 2013
    thanks tatiang.
    i started my first project and i have now a little more complicated problem.

    i have an actor B attached to another moving one A with constraint attributes XY
    i have modified B X+50 and Y+2 to change its place to where i want in A
    now i have made B rotating but i dont know how to change the "center" of the rotation ?
    also i make my main actor A rotate and accelerate to the touch position X,Y but i would like its finish rotating before acclerating.i tried with finish autorotating and angularmotion=0 but its not working.any idea plz ?


    can you help me please ?

    another problem i have now :
    i changed "mouse button down" to "touch pressed" in all my rules and now nothing responding in the preview...
    edit: the touch pressed problem is solved i use touch outside and now its working
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You'll have to do some searching. Not soul searching but forums/Google searching. If you search for off-center rotation GameSalad and rotate facing GameSalad, you should find what you need.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.