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 (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 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
adding .bmp pictures keep moving.. #68282
03/26/06 13:40
03/26/06 13:40
Joined: Mar 2006
Posts: 43
J
jamesk85 Offline OP
Newbie
jamesk85  Offline OP
Newbie
J

Joined: Mar 2006
Posts: 43
Hey,
I was just wondering how do you stop the .bmp added pictures from moving in your level.I've added them fine and put them in the right place but as the avatar gets close to it it moves and follows the position of the avatar. I just want it to stay in the exact same position??

Re: adding .bmp pictures keep moving.. [Re: jamesk85] #68283
03/26/06 13:47
03/26/06 13:47
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
??? do you mean a sprite rotating with the player? If so, assign this action to it to make it stop:

action no_rotate
{
my.facing = off; // stops the automatic rotation
}

If not, have "on" instead of "off".

Another option is to add a tiny rotation to the sprite, 90.007 is as close as you'll get. If scaled, this will vary.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: adding .bmp pictures keep moving.. [Re: ulillillia] #68284
03/26/06 14:45
03/26/06 14:45
Joined: Mar 2006
Posts: 43
J
jamesk85 Offline OP
Newbie
jamesk85  Offline OP
Newbie
J

Joined: Mar 2006
Posts: 43
oh sorry yea I meant a sprite. So do I have to write a new script file and then attach it to the sprite.
Im very new to this and haven't started to write any scripts yet so slightly confused....

Re: adding .bmp pictures keep moving.. [Re: jamesk85] #68285
03/27/06 05:35
03/27/06 05:35
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
You have four options:

1. Use the script I provided (untested).
2. Rotate the sprite very slightly. 90.007 (instead of 90) is as close as you're going to get.
3. You could also have the rotation at 270 instead of 90 (for the first one, the pan). You may need flip the texture horizontally though to get it to look right.
4. Use a model instead of a sprite.

The first method takes out the confusion and keeps the accuracy, but you may need some scripting knowledge, mainly just where you can place the code. The second method also does, but is slightly less accurate. If you need high-precision placement of objects (especially in the case of joining two sprites right next to each other), the second option isn't for you. If the first two options aren't for you, the third option retains the accuracy and gets rid of the rotation effect, but requires a simple modification. If the texture is flipped when you have the rotation at 270, then you'll need to do a quick horizontal flip in your graphics edittor. If you don't want to be bothered with the horizontal flip, if there is the need for it, option 4, using a model instead, is just as good. A sprite is nothing more than a model with 4 vertices and two triangles forming a square or rectangle, of which has a texture tossed onto it.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: adding .bmp pictures keep moving.. [Re: ulillillia] #68286
03/29/06 15:07
03/29/06 15:07
Joined: Mar 2006
Posts: 43
J
jamesk85 Offline OP
Newbie
jamesk85  Offline OP
Newbie
J

Joined: Mar 2006
Posts: 43
from above i just meant to ask. I added the action you provided to my script. it was fine.no errors but the action doesnt appear in the resourses in wed under actions. why is that. How do you get you action to appear in actions either in the resources or when you click on a model or sprite etc be able to select it as a behavior??

Re: adding .bmp pictures keep moving.. [Re: jamesk85] #68287
03/29/06 15:27
03/29/06 15:27
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
To be able to select it as a behavior, there are two methods:

1. (permanent - always updated) Go into WED's preferences and for updating of externally modified files, choose "Auto" instead. This way, any edit you make will be updated automatically in WED. You may need to close WED and reopen it and your level though.
2. (temporary - works once, but has to be redone in a future case) Just close WED and reopen it and your level.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: adding .bmp pictures keep moving.. [Re: ulillillia] #68288
03/29/06 15:54
03/29/06 15:54
Joined: Mar 2006
Posts: 43
J
jamesk85 Offline OP
Newbie
jamesk85  Offline OP
Newbie
J

Joined: Mar 2006
Posts: 43
ok that worked well. its there now as an action but the action doesnt do anything!
action no_rotate
{
my.facing = off; // stops the automatic rotation
}
that was the code I put in and added the action to the .bmp sprite but it is still moving. I went into the behavior and its there but there's nothing in it??

Re: adding .bmp pictures keep moving.. [Re: jamesk85] #68289
03/29/06 16:08
03/29/06 16:08
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Manual quote:
Quote:

If neither flag is set, the sprite will look like a billboard, standing upright, and horizontally always turning to the player.



Code:

action no_rotate {
my.oriented = on;
my.facing = off;
my.decal = off;
//my.pan = 90.007;
}



Re: adding .bmp pictures keep moving.. [Re: testDummy] #68290
03/29/06 16:31
03/29/06 16:31
Joined: Mar 2006
Posts: 43
J
jamesk85 Offline OP
Newbie
jamesk85  Offline OP
Newbie
J

Joined: Mar 2006
Posts: 43
guys ye are legends. It works.
sound out!!


Moderated by  HeelX, rvL_eXile 

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