Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 13,972 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: animation [Re: gamingfan101] #273917
06/24/09 23:00
06/24/09 23:00
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

if(key_d){boxie.pos_x -=24*time_step}

// add ; at the end as below
if(key_d){boxie.pos_x -=24*time_step;}


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: animation [Re: Ottawa] #273921
06/24/09 23:21
06/24/09 23:21
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
Thanks! and also, while this will work for now, how would i make one bitmap fall from the top of the screen to the bottom of the screen and out at random, also having that one bitmap on the screen in several places? Sorry the question is not very clear, basically all i want this one bmap to do is fall from the top, to the bottom, and out. Its pos_x will change at random eace time it falls.

Last edited by gamingfan101; 06/24/09 23:22.

Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: animation [Re: gamingfan101] #273922
06/24/09 23:30
06/24/09 23:30
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
and the script still doesnt work, heres a simplified version for test.

///////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////

PANEL* boxie_pan =
{
bmap = "boxie.bmp";
pos_x = 300;
pos_x = 300;
layer = 1;
flags = OVERLAY | SHOW;
}

function animateboxie()
{
while(!key_d) wait(1);
while(1);
{
if(key_d){boxie.pos_x -=24*time_step;}
}
}


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: animation [Re: gamingfan101] #274033
06/25/09 12:24
06/25/09 12:24
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Your position would have to be set outside the panel definition.

Make a function that will play with the position.


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: animation [Re: Ottawa] #274067
06/25/09 15:04
06/25/09 15:04
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
What you want to move?
{boxie.pos_x -=24*time_step;}
You declare boxie at your code? Or you want to move the boxie_pan ?
Then use
{boxie_pan.pos_x -=24*time_step;}

Re: animation [Re: Widi] #274351
06/26/09 15:46
06/26/09 15:46
Joined: Jul 2008
Posts: 223
Pittsburgh
The_Clyde Offline
Member
The_Clyde  Offline
Member

Joined: Jul 2008
Posts: 223
Pittsburgh
no ";" after while(1)

also the screen position is relative to the top left corner.
and you have to call the panel by the name you defined it with (boxie_pan)
higher Y values are actually in the DOWN direction
so its like this:

function animateboxie()
{
while(!key_d) wait(1);
while(1)
{
if(key_d) boxie_pan.pos_y -= 24 * time_step;
}
}

also make sure animateboxie() is called somewhere, like in main() or in an action.

Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1