Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

damagex

Members
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

0 Neutral

About damagex

  • Rank
    Junior Member
  1. Thanks, it was my intention to use the debugbox and make the game look like this, but now that I think of it, I might be able to create a GUI with a large textbox and make the game playable there. I'm not that much familiar with the drawing functions yet, but I will look into that later. Updated! Redone the script, it's now much more dynamic.
  2. I think it might be a nice addition to add spoiler tags to the forum. So for example I can put changelogs, older versions etc. in a spoiler to keep my thread clean.
  3. Ah well, either that or the one I posted. It doesn't work. hehe.
  4. The wiki button on the front page is not working. It redirects me to a blank page. The page I get is: http://scar-divi.com/index.php?page=wiki The page is should be: http://wiki.scar-divi.com/index.php?title=SCAR_Divi_Online_Manual
  5. Is there any way to run multiple procedures simultaneously? Like for instance, in my script I got 1 updater, which should be repeated every 5 seconds Then I have another procedure, which should run, while the update is running too. So, what I need is something like a timer.
  6. [align=center] Top down shooter Created by: damagex Current V1.2a This topic will be updated whenever I release a next version. Please report any bugs to me. [spoiler=[b]Controls[/b]] What controls do I use? Movement = Left/Right arrows Shoot = Left CTRL [spoiler=[b]Features[/b]] Current features: Kill counter Lifes system Adjustable Field Height and Width Adjustable background (stars) Adjustable Refresh Rate Future features: - Powerups (Extra life, stronger bullets) - Ship movement (up and down) - Extra weapons - More enemies [scar] (* Easy Top Down Shooter *) { Created by: damagex @ scar-divi.com } { Version 1.2a } const //Difficulty settings\\ refreshRate = 100; // Low = hard - High = easy fieldWidth = 30; // Low = easy - High = hard fieldHeight = 10; // Low = hard - High = easy //Other Settings\\ useBackground = 0; // 0 = off - 1 = on var fieldArr : Array[1..fieldWidth] of Array[0..fieldHeight] of String; field : Array [0..fieldHeight] of AnsiString; enemy, bullet : Array [0..fieldHeight] of Integer; i, e, f, bg, current, Lifes, score : Integer; isShooting, isEnemy, spawnEnemy : Integer; information, layout : String; repeater : Integer; begin repeater := 0; lifes := 3; spawnEnemy := 0; isEnemy := 0; current := fieldWidth div 2; isShooting := 0; score := 0; information := ''; for i := low(enemy) to high(enemy) do begin enemy := 0; end; for i := low(bullet) to high(bullet) do begin bullet := 0; end; repeat // Input Handler if (IsArrowDown(1)) then begin if(current < fieldWidth) then begin current := current + 1; end; end; if (IsArrowDown(3)) then begin if(current > Low(fieldArr)) then begin current := current - 1; end; end; if (IsFunctionKeyDown(4)) AND not (isShooting <> 0) then begin bullet[1] := current; isShooting := 1; end; // Enemy handler spawnEnemy := 1; if (spawnEnemy = 1) AND not (isEnemy <> 0) then begin isEnemy := 1; enemy[high(enemy)] := RandomRange(Low(fieldArr)+1,fieldWidth); spawnEnemy := 0; end; layout := ''; for f := low(fieldArr) to fieldWidth do begin layout := layout + '_'; end; for f := low(field) to fieldHeight do begin field[f] := '|'; end; for i := low(fieldArr) to fieldWidth do begin for e:= low(field) to fieldHeight do begin if (e = 0) then begin if (i <> current) then begin fieldArr[0] := ' '; end else begin fieldArr[0] := 'A'; end; end else begin if (i <> bullet[e]) then begin if (i <> enemy[e]) then begin if (useBackground = 1) then begin bg := RandomRange(0,50); end; if not (bg = 1) then begin fieldArr[e] := ' '; bg := 0; end else begin fieldArr[e] := '+'; end; end else begin fieldArr[e] := 'V'; end; end else begin fieldArr[e] := '.'; end; end; end; for f := low(field) to high(field) do begin field[f] := field[f] + fieldArr[f]; end; end; for f := low(field) to high(field) do begin field[f] := field[f] + '|'; end; clearDebug; WriteLn(' '+layout+' '); i := high(field); while (i > -1) do begin WriteLn(field); i := i - 1; end; WriteLn('|'+layout+'|'); WriteLn(information); WriteLn('Press "CTRL + ALT + S" to stop playing'); WriteLn('Created by: Damagex @ scar-divi.com'); WriteLn(bg); wait(refreshRate); i := 1; for i := 1 to fieldHeight do begin if (enemy = bullet) AND (enemy <> 0) OR (enemy[i-1] = bullet) AND (enemy[i-1] <> 0) then begin enemy := 0; enemy[i-1] := 0; bullet := 0; isShooting := 0; isEnemy := 0; Score := Score + 1; end; end; i := 1; e := 0; if (isShooting = 1) then begin while (e = 0) do begin if (i = high(bullet)) then begin isShooting := 0; e := 1; end else if (bullet > 0) then begin e := 1; bullet[i+1] := bullet; end; bullet := 0; i := i + 1; end; end; if (repeater > 5) then begin i := fieldHeight; e := 0; if (isEnemy = 1) then begin while (e = 0) do begin if (i = 1) then begin e := 1; isEnemy := 0; lifes := lifes-1; end else if (enemy > 0) then begin e := 1; enemy[i-1] := enemy; end; enemy := 0; i := i - 1; end; end; repeater := 0; end else begin repeater := repeater + 1; end; information := 'Kills: ' + IntToStr(score) + ' - Lifes left: ' + IntToStr(lifes); until(lifes = -1); ClearDebug; WriteLn(' _____________________________________________________________________ '); WriteLn('| ______ _______ _______ _______ _____ _ _ _______ ______ |'); WriteLn('| | ____ |_____| | | | |______ | | \ / |______ |_____/ |'); WriteLn('| |_____| | | | | | |______ |_____| \/ |______ | \_ |'); WriteLn('| Game Report scar-divi.com |'); WriteLn('| Final Kill Count: ' + IntToStr(score) + ' Damagex |'); WriteLn('|_____________________________________________________________________|'); end. [/scar] [spoiler=[b]Changelog[/b]] version 1.2a Script tweaks New adjustable settings for difficulty [spoiler=[b]Older Versions[/b]] [scar](*Top Down Shooter *) { Created by: damagex @ scar-divi.com } { Version 0.8a } const refreshRate = 500; //Lower = Faster = More difficult fieldWidth = 20; //Higher = Bigger = More difficult var Field0Arr, Field1Arr, Field2Arr, Field3Arr, Field4Arr, Field5Arr, Field6Arr, Field7Arr : Array[1..fieldWidth] of String; i, current, bullet, bullet1, bullet2, bullet3, bullet4, bullet5, bullet6, bullet7 : Integer; enemy, enemy1, enemy2, enemy3, enemy4, enemy5, enemy6, enemy7 : Integer; isShooting, isEnemy, spawnEnemy, Lifes, score: Integer; Field0, Field1, Field2, Field3, Field4, Field5, Field6, Field7, information : String; begin lifes := 3; spawnEnemy := 0; isEnemy := 0; enemy := 0; enemy1 := 0; enemy2 := 0; enemy3 := 0; enemy4 := 0; enemy5 := 0; enemy6 := 0; enemy7 := 0; current := fieldWidth div 2; bullet := 0; bullet2 := 0; bullet3 := 0; bullet4 := 0; bullet5 := 0; bullet6 := 0; bullet7 := 0; isShooting := 0; score := 0; information := ''; repeat // Input Handler if (IsArrowDown(1)) then begin if(current < High(Field0Arr)) then begin current := current + 1; end; end; if (IsArrowDown(3)) then begin if(current > Low(Field0Arr)) then begin current := current - 1; end; end; if (IsFunctionKeyDown(4)) AND not (isShooting <> 0) then begin bullet := current + 1; isShooting := 1; end; // Enemy handler spawnEnemy := RandomRange(0,10); if (spawnEnemy = 1) AND not (isEnemy <> 0) then begin isEnemy := 1; enemy7 := RandomRange(Low(Field0Arr)+1,High(Field0Arr)); spawnEnemy := 0; end; // Field Updater Field0 := '|'; Field1 := '|'; Field2 := '|'; Field3 := '|'; Field4 := '|'; Field5 := '|'; Field6 := '|'; Field7 := '|'; for i := Low(Field0Arr) to High(Field0Arr) do begin if (i <> current) then begin Field0Arr := ' '; End else begin Field0Arr := '/|\'; end; if (i <> bullet) then begin if (i <> enemy) then begin Field1Arr := ' '; end else begin Field1Arr := 'V'; end; end else begin Field1Arr := '.'; end; if (i <> bullet2) then begin if (i <> enemy2) then begin Field2Arr := ' '; end else begin Field2Arr := 'V'; end; end else begin Field2Arr := '.'; end; if (i <> bullet3) then begin if (i <> enemy3) then begin Field3Arr := ' '; end else begin Field3Arr := 'V'; end; end else begin Field3Arr := '.'; end; if (i <> bullet4) then begin if (i <> enemy4) then begin Field4Arr := ' '; end else begin Field4Arr := 'V'; end; end else begin Field4Arr := '.'; end; if (i <> bullet5) then begin if (i <> enemy5) then begin Field5Arr := ' '; end else begin Field5Arr := 'V'; end; end else begin Field5Arr := '.'; end; if (i <> bullet6) then begin if (i <> enemy6) then begin Field6Arr := ' '; end else begin Field6Arr := 'V'; end; end else begin Field6Arr := '.'; end; if (i <> bullet7) then begin if (i <> enemy7) then begin Field7Arr := ' '; end else begin Field7Arr := 'V'; end; end else begin Field7Arr := '.'; end; Field0 := Field0 + Field0Arr; Field1 := Field1 + Field1Arr; Field2 := Field2 + Field2Arr; Field3 := Field3 + Field3Arr; Field4 := Field4 + Field4Arr; Field5 := Field5 + Field5Arr; Field6 := Field6 + Field6Arr; Field7 := Field7 + Field7Arr; end; Field0 := Field0 + '|' Field1 := Field1 + ' |' Field2 := Field2 + ' |' Field3 := Field3 + ' |' Field4 := Field4 + ' |' Field5 := Field5 + ' |' Field6 := Field6 + ' |' Field7 := Field7 + ' |' ClearDebug; WriteLn(Field7); WriteLn(Field6); WriteLn(Field5); WriteLn(Field4); WriteLn(Field3); WriteLn(Field2); WriteLn(Field1); WriteLn(Field0); WriteLn(information); WriteLn('Press "CTRL + ALT + S" to stop playing'); WriteLn('Created by: Damagex @ scar-divi.com'); wait(refreshRate); if (enemy = bullet) AND (enemy <> 0) OR (enemy2 = bullet) AND (enemy2 <> 0) then begin enemy := 0; enemy2 := 0; bullet := 0; isShooting := 0; isEnemy := 0; Score := Score + 1; end else if (enemy2 = bullet2) AND (enemy2 <> 0) OR (enemy3 = bullet2) AND (enemy3 <> 0) then begin enemy2 := 0; enemy3 := 0; bullet2 := 0; isShooting := 0; isEnemy := 0; Score := Score + 1; end else if (enemy3 = bullet3) AND (enemy3 <> 0) OR (enemy4 = bullet3) AND (enemy4 <> 0) then begin enemy3 := 0; enemy4 := 0; bullet3 := 0; isShooting := 0; isEnemy := 0; Score := Score + 1; end else if (enemy4 = bullet4) AND (enemy4 <> 0) OR (enemy5 = bullet4) AND (enemy5 <> 0) then begin enemy4 := 0; enemy5 := 0; bullet4 := 0; isShooting := 0; isEnemy := 0; Score := Score + 1; end else if (enemy5 = bullet5) AND (enemy5 <> 0) OR (enemy6 = bullet5) AND (enemy6 <> 0) then begin enemy5 := 0; enemy6 := 0; bullet5 := 0; isShooting := 0; isEnemy := 0; Score := Score + 1; end else if (enemy6 = bullet6) AND (enemy6 <> 0) OR (enemy7 = bullet6) AND (enemy7 <> 0) then begin enemy6 := 0; enemy7 := 0; bullet6 := 0; isShooting := 0; isEnemy := 0; Score := Score + 1; end else if (enemy7 = bullet7) AND (enemy7 <> 0) then begin enemy7 := 0; bullet7 := 0; isShooting := 0; isEnemy := 0; Score := Score + 1; end; if (bullet > 0)then begin bullet2 := bullet; bullet := 0; end else if (bullet2 > 0) then begin bullet3 := bullet2; bullet2 := 0; end else if (bullet3 > 0) then begin bullet4 := bullet3; bullet3 := 0; end else if (bullet4 > 0) then begin bullet5 := bullet4; bullet4 := 0; end else if (bullet5 > 0) then begin bullet6 := bullet5; bullet5 := 0; end else if (bullet6 > 0) then begin bullet7 := bullet6; bullet6 := 0; end else if (bullet7 > 0) then begin bullet7 := 0 isShooting := 0; end; if(enemy7 > 0)then begin enemy6 := enemy7; enemy7 := 0; end else if (enemy6 > 0) then begin enemy5 := enemy6; enemy6 := 0; end else if (enemy5 > 0) then begin enemy4 := enemy5; enemy5 := 0; end else if (enemy4 > 0) then begin enemy3 := enemy4; enemy4 := 0; end else if (enemy3 > 0) then begin enemy2 := enemy3; enemy3 := 0; end else if (enemy2 > 0) then begin enemy := enemy2; enemy2 := 0; end else if (enemy > 0) then begin enemy:= 0 isEnemy := 0; lifes := lifes - 1; end; information := 'Kills: ' + IntToStr(score) + ' - Lifes left: ' + IntToStr(lifes); until(lifes = -1); ClearDebug; WriteLn(' _____________________________________________________________________ '); WriteLn('| ______ _______ _______ _______ _____ _ _ _______ ______ |'); WriteLn('| | ____ |_____| | | | |______ | | \ / |______ |_____/ |'); WriteLn('| |_____| | | | | | |______ |_____| \/ |______ | \_ |'); WriteLn('| Game Report scar-divi.com |'); WriteLn('| Final Kill Count: ' + IntToStr(score) + ' Damagex |'); WriteLn('| Playtime: ' + IntToStr(GetTimeRunning) + ' ms |'); WriteLn('|_____________________________________________________________________|'); end.[/scar] [/align]
  7. damagex

    Forums

    I actually meant using scripts, plugins or includes. Not in the application itself.
  8. damagex

    Wiki Tags

    Oh, yea. I can understand that. Still, good work on the wiki. I can't remember it being documented like this, in a positive way. Although I haven't used SCAR for years.
  9. Wow, could you add code tags please?
  10. damagex

    Wiki Tags

    Well done! Nice addition I will try to add some content to the wiki soon as I've seen that there are some missing functions there.
  11. damagex

    Forums

    The buttons look fine here, maybe you have a different browser or smaller resolution? Though when I resize my window it looks the same... As for the arcade system, I don't really think it adds any value to the community tbh... What about an alternative for this arcade system. We build our own arcade system within SCAR. Also good for when people are a bored, they can work on it. It can contain a highscore, so it adds the competition. SCAR scripters get more experience with the language AND last but not least. SCAR might get some more popularity. Just some random thoughts, hehe. Might open a topic for this to see if more people support it. For example - SCARcade?
  12. Well, the text is at like 0,300 to 500,700 but I can't seem to set a field. Alright, i'll try to do that.
  13. I'm afraid I won't understand my own scripts anymore, but thanks for the information. I'll see what I can do. Will probably make a personal documentation then.
  14. How do I read text from another clients chat. I got the following test script, but it gives me some weird results. var Characters:integer; Text:String; const FontName='Helvetica'; FontSize=8; FontBold=False; FontItalic=False; FontUnderline=False; FontStrike=False; begin Characters:=LoadCharsFromFont2(FontName,Fontsize,FontBold,FontItalic,FontUnderline,FontStrike); Text:=GetTextAtEx(300,300,50,Characters,False,False,0,1,0,32,False,tr_AllChars); WriteLn(Characters); WriteLn(Text); end. This script results: Successfully compiled (31 ms) 0 #' ¯ Successfully executed (63 ms) I've tried diffrent fonts and sizes. Still no luck. Any idea?
×
×
  • Create New...