
-----------------------------------
mimi
Sat Jan 03, 2004 7:14 pm


-----------------------------------
:(  i need mad help....; I am making a game that is called bomberman... and i need help... when i move the "player 1" the bombs under it is erased and i need the bombs 2 show after the player has been moved... but instead it shows the player...
please i need mad help :cry:

-----------------------------------
DanShadow
Sat Jan 03, 2004 8:18 pm


-----------------------------------
Mimi, I have a solution to your problem! The "Almighty Array"! 

*ominous trumpets sound in the distance*

hmm...try this:

var playerx, playery : int
playerx := 20
playery := 380
var key : string (1) := ""
var num, counter : int := 0
var bombx, bomby : array 1 .. 200 of int
for i : 1 .. 200
    bombx (i) := -20
    bomby (i) := -20
end for

loop
    setscreen ("offscreenonly")
    View.Update
    delay (5)
    num := num + 1
    Draw.FillBox (0, 0, maxx, maxy, 255)
    Draw.FillBox (playerx - 20, playery - 20, playerx + 20, playery + 20, 1)
    if hasch then
        getch (key)
    end if
    if key = (KEY_RIGHT_ARROW) and playerx < maxx - 10 then
        playerx := playerx + 6
    elsif key = (KEY_LEFT_ARROW) and playerx > 10 then
        playerx := playerx - 6
    end if
    for i : 1 .. 200
        if bomby (i) < 0 then
            bombx (i) := -20
            bomby (i) := -20
        end if
        if bombx (i) not= -20 and bomby (i) not= -20 then
            Draw.FillOval (bombx (i), bomby (i), 15, 15, 12)
            bomby (i) := bomby (i) - 18
        end if
    end for
    if counter >= 5 then
        if bombx (num) = -20 and bomby (num) = -20 then
            bombx (num) := playerx
            bomby (num) := playery - 15
            counter := 0
        end if
    end if
    counter := counter + 1
    if num = 199 then
        num := 0
    end if
end loop

Oh and sorry for giving away the answer....but Mimi, I purposely didnt put in comments. This way you can examine the code, figure how everything works, and use it if  you wish in your game. Oh, if you have any questions, or get confused in the code, just Private Message me...because chances are I probably wont see your message if you post it here.
Enjoy

-----------------------------------
mimi
Sun Jan 04, 2004 2:35 pm


-----------------------------------
:(  i need mad help....; I am making a game that is called bomberman... and i need help... when i move the "player 1" the bombs under it is erased and i need the bombs 2 show after the player has been moved... but instead it shows the player...
please i need mad help :cry:

-----------------------------------
mimi
Sun Jan 04, 2004 3:52 pm


-----------------------------------
i was wondering if anyone knows how 2 use a Pic>Merge???? 
if soo please let me know... i wna tto know the parameters that are needed 2 use it... :?

-----------------------------------
DanShadow
Sun Jan 04, 2004 4:21 pm


-----------------------------------
I do... use this .

var bomberman:=Pic.New("bomberman.bmp")
Draw.Pic(bomberman,20,50,picMerge)


-----------------------------------
mimi
Sun Jan 04, 2004 10:55 pm


-----------------------------------
DanShadow....
:) Thank you very much 
... it was very help full :D 

-----------------------------------
DanShadow
Mon Jan 05, 2004 10:02 am


-----------------------------------
lol, your welcome

-----------------------------------
Skizzarz
Fri Jan 09, 2004 8:25 pm


-----------------------------------
Holy shit, this topic was posted almost a year ago and its still going and not blocked, pretty crazy.

Mod: I splitted the topic, now this part belongs to the help section, like it's suppose to

-----------------------------------
Andy
Fri Jan 09, 2004 9:17 pm


-----------------------------------
picMerge places the picture on the screen so that the background color of ur picture is not shown
