The Daily Click ::. Forums ::. Klik Coding Help ::. Why does this happen..?? Jamagiiiiic!!
 

Post Reply  Post Oekaki 
 

Posted By Message

Dogzer



Registered
  07/02/2011
Points
  1029
12th July, 2003 at 16:32:25 -

Code:

Var demowindow = New Window(640,480,(System.GetScreenWidth() / 2) -320,(System.GetScreenHeight() / 2)-240);

Var StartTime = System.GetElapsedTime();

demowindow.SetAutoRefresh(OFF);

While (!Keyboard.IsKeyDown(Keyboard.ESCAPE))
{

CurrentTime = System.GetElapsedTime();

If (CurrentTime - StartTime > 0)
{
Char1 = New Sprite(20,420,"Char1_1");
Char1.Play();

}

demowindow.Refresh();

While (System.GetElapsedTime() - CurrentTime < 25)
{
}
}

;You'll have to make your own animation if you want to help me, name it "Char1_1" but if
; you are curious I can give the animation I have to you just drop me your mail

 
n/a

Dogzer



Registered
  07/02/2011
Points
  1029
12th July, 2003 at 16:33:38 -

how do I fix the overlapping? its been a long time since I use jamagic and I cant remember ;_;

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
12th July, 2003 at 16:33:56 -

That c++ or Jamagic?

 
Craps, I'm an old man!

Dogzer



Registered
  07/02/2011
Points
  1029
12th July, 2003 at 16:43:21 -

jamagic ;p

 
n/a

Dogzer



Registered
  07/02/2011
Points
  1029
12th July, 2003 at 16:44:07 -

c++ is leet

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
12th July, 2003 at 16:47:48 -

can't help you then, sorry.

 
Craps, I'm an old man!

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
12th July, 2003 at 20:40:40 -

LOL C++ definately doesnt look that nice, Shab

First of all, your code is pretty confusing, there are a lot better ways of doing what [I think] your trying to do.

Dogzer: You can put one sprite infront of another by using the commands: Sprite.MoveBefore(Sprite) and Sprite.MoveAfter(Sprite)

Here's an extraction from the help file:

Move Before
Moves the sprite just behind another sprite.

- Sprite: Sprite to be displayed after the current sprite.

Move After
Moves the sprite in font of another sprite.

- Sprite: Sprite to be displayed before the current sprite.

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Dogzer



Registered
  07/02/2011
Points
  1029
12th July, 2003 at 20:44:06 -

thx, I've got it.

 
n/a

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
12th July, 2003 at 20:45:53 -

BTW, you can go:

While (System.GetElapsedTime() - CurrentTime < 25);

for while loops that you dont want to have anything contained inside. I think that looks a lot neater.

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Dogzer



Registered
  07/02/2011
Points
  1029
14th July, 2003 at 12:55:55 -

nice tip! every line I can reduce saves a lot of streess on my poor brain

 
n/a

Aali [Crazy_Productions]



Registered
  13/10/2002
Points
  843
14th July, 2003 at 13:02:47 -

also, ditch the "var" commands, they're just stupid

 
"If Darl McBride was in charge, he'd probably make marriage unconstitutional too, since clearly it de-emphasizes the commercial nature of normal human interaction, and probably is a major impediment to the commercial growth of prostitution."
-- Linus Torvalds, December 5th 2003.

(Darl McBride is CEO of The SCO Group)


this place sucks but don't tell anyone, it's our little secret, ok?
   

Post Reply



 



Advertisement

Worth A Click