Alright im Coding a Autofighter. I Got it Done.

Discussion in 'Scar/Simba Help' started by Spawnzor, Aug 8, 2007.

Alright im Coding a Autofighter. I Got it Done.
  1. Unread #1 - Aug 8, 2007 at 2:05 AM
  2. Spawnzor
    Referrals:
    0

    Spawnzor Guest

    Alright im Coding a Autofighter. I Got it Done.

    But. Scar Doesnt Support

    SwitchStatement; ?

    Can Someone Help me. Or Give me the Same thing as SwitchStatement?
     
  3. Unread #2 - Aug 8, 2007 at 2:16 AM
  4. Zeta
    Joined:
    Jan 21, 2007
    Posts:
    1,680
    Referrals:
    3
    Sythe Gold:
    0

    Zeta Guru
    Banned

    Alright im Coding a Autofighter. I Got it Done.

    Mind if i ask what SwitchStatement does? Or post your script? I'm not the best at scar but i'm probably the only one on that will post here..
     
  5. Unread #3 - Aug 8, 2007 at 2:17 AM
  6. mr.gibblet
    Joined:
    Jun 29, 2007
    Posts:
    454
    Referrals:
    0
    Sythe Gold:
    0

    mr.gibblet Forum Addict
    Do Not Trade

    Alright im Coding a Autofighter. I Got it Done.

    I am posting here too ^_^. Yes, if you explained to us what SwitchStatement does, we would be helped out alot.

    Do you mean like Switch? where you use cases and all? Or what?

    -Thanks,
    mr.gibblet
     
  7. Unread #4 - Aug 8, 2007 at 2:21 AM
  8. Spawnzor
    Referrals:
    0

    Spawnzor Guest

    Alright im Coding a Autofighter. I Got it Done.

    Puts it in a loop Until Lets Say. The Monster HP Reaches 0 then it Finds Another Target.

    Then it Does the Same thing for the Other Monster.
     
  9. Unread #5 - Aug 8, 2007 at 5:39 PM
  10. crossback7
    Joined:
    Jun 12, 2007
    Posts:
    202
    Referrals:
    0
    Sythe Gold:
    0

    crossback7 Active Member

    Alright im Coding a Autofighter. I Got it Done.

    Use OutFight. It will wait until your out of a fight before moving on in the procedure or function. Much easier.
     
  11. Unread #6 - Aug 8, 2007 at 5:42 PM
  12. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Alright im Coding a Autofighter. I Got it Done.

    Code:
    repeat
      Wait(1);
    until(Monster = Dead);
    If only it was that easy. But that is what a loop looks like in Scar. You may want to look into If, Then, Else statements.
     
  13. Unread #7 - Aug 10, 2007 at 8:55 AM
  14. pker overkil
    Joined:
    Feb 11, 2007
    Posts:
    387
    Referrals:
    0
    Sythe Gold:
    0

    pker overkil Forum Addict

    Alright im Coding a Autofighter. I Got it Done.

    Code:
    Program MonsterKiller;
     var
     Monsters2kill:integer;
     
    begin
    repeat
    if monster = Dead then
      begin
      Monsters2kill:=Monsters2kill+1
      FindNewMonster
      end else
      KeepFighting
    Until(Monsters2kill=5) //how many monsters you want to kill
    end
    Another example of something like Towns except using if then else statements.
     
< Need help new to scar | stupid question but i need help >

Users viewing this thread
1 guest


 
 
Adblock breaks this site