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
1 registered members (AndrewAMD), 16,038 guests, and 5 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
bmap_for_entity #169633
11/27/07 05:57
11/27/07 05:57
Joined: Sep 2007
Posts: 80
R
ruchen Offline OP
Junior Member
ruchen  Offline OP
Junior Member
R

Joined: Sep 2007
Posts: 80
I want to make a circular image rotate,the I defined an entity with a cylinder model,entrusted it the image.But how coule I use the function bmap_for_entity?Or how can I realize it?

Re: bmap_for_entity [Re: ruchen] #169634
11/27/07 13:51
11/27/07 13:51
Joined: Sep 2007
Posts: 80
R
ruchen Offline OP
Junior Member
ruchen  Offline OP
Junior Member
R

Joined: Sep 2007
Posts: 80
I use another method,the picture is assigned to the entity in the definition.Here is the script:
action roll()
{
while (1)
{
my.roll += 5 ;
my.roll %= 360;
wait (1);
}
}
entity tupian
{
type = <fangxp.png>; //the picture that I want to rotate
layer = 85;
flags = visible;
x = ...;
y = ...;
z = ...;

event = roll;
}
the picture appears on the screen,but the function roll didn't work,in other words the picture doesn't rotate,why?why can't the function do effect?

Re: bmap_for_entity [Re: ruchen] #169635
11/27/07 14:46
11/27/07 14:46
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
If you want to rotate the image, just write this
line somewhere in your main :

Code:

function main()
{
....
tupian.roll += speed * time_step;
....
}



Re: bmap_for_entity [Re: vlau] #169636
11/27/07 15:27
11/27/07 15:27
Joined: Sep 2007
Posts: 80
R
ruchen Offline OP
Junior Member
ruchen  Offline OP
Junior Member
R

Joined: Sep 2007
Posts: 80
Thank you very much,vlau!You are right!

Re: bmap_for_entity [Re: ruchen] #169637
11/27/07 15:47
11/27/07 15:47
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
Event function is only triggered by events , eg. collision , scan. Also you cant (I think) assign an action to an event , it should be a function instead , and its good to have the while loops outside the event function. Dont ignore this last text , because you'll have problems in the future


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201

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