
-----------------------------------
TheFerret
Sat Feb 21, 2004 12:28 am

Weird Little Problem
-----------------------------------
In my program (like Ledgend of Zelda) when my guy hits the wall his head and eyes keep going over but the rest of the body stays there until you relase the over button, if you hit over once against the wall he gets meesed up but if you hit over again or hit over twice against a wall he is normal... (Replace over with right) Use the right wall to test... Also if m guy kills an emeny with his sword the enemey will turn red but the problem is that when he is under or beside him, the enemy changes colout, is there a way to get it when the tip of his sword goes in him to make him change colour not when the sword is beside him or below him...

P.S. What do you think about me and my friends program...(Right now when you go down in the center divider he gets messed up, I have to fix it later...)

.BMP in next post...

-----------------------------------
Cervantes
Sat Feb 21, 2004 9:33 am


-----------------------------------
wow your code is very messy and almost all of it is unecessary :|

Instead of having variables for his head and sword and all that, you have to do the following:

draw a few pictures of him in paint (facing various angles, attacking or not)
then import those pictures like so

var zelda : int := Pic.New ("Zelda")


use case for animations

-----------------------------------
jonos
Sat Feb 21, 2004 9:40 am


-----------------------------------
edit: wow cervants is too damn quick

i didn't take a really long look at your code, but you should make the figure (link???) a picture and then use that to move, becaue when it is all in separate parts it can fall apart (and does). nice first level.

one more thing you should add:
in your if statements for the amount the character should move, you should lessen the amount (i put it to 5 and it worked fine), as well you should make that amount a  constant (const). also, you could get rid of some of the if statements and just do all the j := j+15, k:= k+15 in one if statment, then you wouldn't need al lthose if statements. 
you have it

    if chars (KEY_UP_ARROW) then
        k := k + 5
    end if
    if chars (KEY_UP_ARROW) then
        b := b + 5
    end if
    if chars (KEY_UP_ARROW) then
        i := i + 5
    end if
    if chars (KEY_UP_ARROW) then
        m := m + 5
    end if

you might want to change it to:
if chars (KEY_UP_ARROW) then
k := k+5
b := b+5
i := i+5
m := m+5
end if

im not sure if how you have it is needed for your game, maybe im missing something, but that is the way i would do.

anyways, nice program and nice start!!!

-----------------------------------
GUI.GetScrollBarWidth : i
Sat Feb 21, 2004 7:27 pm


-----------------------------------
that cool i like legand of zelda

-----------------------------------
TheFerret
Sun Feb 22, 2004 9:29 pm


-----------------------------------
When I use var zelda : int := Pic.New ("Zelda")  for a picture and try to run it is says there is an error and will not run it, whyor what do I have to put...

-----------------------------------
Paul
Sun Feb 22, 2004 9:33 pm


-----------------------------------
include file extension, whatever it is. like zelda.bmp or zelda.jpg and the pic  also has to be in the same folder where you're saving the .t file.

-----------------------------------
TheFerret
Sun Feb 22, 2004 9:49 pm


-----------------------------------
It says argument is wrong type var test : int := Pic.New ("test.bmp")

-----------------------------------
Paul
Sun Feb 22, 2004 10:03 pm


-----------------------------------
oh yea that too

var cash := Pic.FileNew ("cash.bmp")

no int. if you type Pic.FileNew and press F9 it tells you.[/code]

-----------------------------------
TheFerret
Sun Feb 22, 2004 10:18 pm


-----------------------------------
when I put var test := Pic.FileNew ("test.bmp")
put test
 all it outputs is 7001 an dit does not put my picture...

-----------------------------------
Paul
Sun Feb 22, 2004 10:28 pm


-----------------------------------
Yea, you have to draw the pic too, its in the help file.

var test := Pic.FileNew ("test.bmp")
Pic.Draw (test, 75, 10, picMerge)

-----------------------------------
TheFerret
Sun Feb 22, 2004 10:57 pm


-----------------------------------
Ok, I shortened up the code a lot to 111 lines and I am wondering how to get a circle to be drawn over the enemy when the guys sword goes in him... I have tried      % if l >= 285 and l = maxy - 90 and m = 407 then 
        x -= change 

    end if 
    %Bototm wall detection 
    if y = 407 then 
        x -= change 

    end if 
    %Bototm wall detection 
    if y 