Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Joey, flink, AndrewAMD), 1,226 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Tileing a sprite #137543
06/21/07 20:29
06/21/07 20:29
Joined: May 2006
Posts: 69
Canada
L
Leaf Offline OP
Junior Member
Leaf  Offline OP
Junior Member
L

Joined: May 2006
Posts: 69
Canada
I posted in starting with gamestudio, because I thought I've seen the script around somewhere. But I cant seem to find it again.

http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/763161/an/0/page/0#Post763161

What im looking for is to tile a sprite along the x axis at 0 on the y axis.

I've been doing trail and error but no luck so far.

Thanks in advance

Re: Tileing a sprite [Re: Leaf] #137544
06/21/07 21:54
06/21/07 21:54
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Next time, don't crosspost your questions! It's bad I tell ya
No really, don't. Wait for a response in that forum or put it in the right forum directly. If you made a mistake, ask a moderator to move it.

Code:


function tile_sprite (amount_of_tiles, tile_width) {

var counter;
while (counter < amount_of_tiles) {
//put a tile on an increasing x-axis position
ent_create ("tile.pcx", vector (counter * tile_width, 0, 0), null);
counter += 1;
}

}

tile_sprite (15, 64); //15 = amount of tiles, 64 = width of the bmap (in this case tile.pcx)




Like that?

Last edited by Jostie; 06/21/07 21:57.

Click and join the 3dgs irc community!
Room: #3dgs
Re: Tileing a sprite [Re: Joozey] #137545
06/22/07 03:41
06/22/07 03:41
Joined: May 2006
Posts: 69
Canada
L
Leaf Offline OP
Junior Member
Leaf  Offline OP
Junior Member
L

Joined: May 2006
Posts: 69
Canada
I tried your code above and would get an error before the 1st frame. So I re-wrote it kinda. And now it runs with no errors but I dont see the tiling sprites


function tile_sprite (amount_of_tiles, tile_width) {
var amount_of_tiles = 15;
var tile_width = 512;
var counter;
while (counter < amount_of_tiles) {
//put a tile on an increasing x-axis position
ent_create ("water.pcx", vector (counter * tile_width, 0, 0), null);
counter += 1;
}

}

Last edited by Leaf; 06/22/07 03:43.
Re: Tileing a sprite [Re: Leaf] #137546
06/27/07 19:05
06/27/07 19:05
Joined: May 2006
Posts: 69
Canada
L
Leaf Offline OP
Junior Member
Leaf  Offline OP
Junior Member
L

Joined: May 2006
Posts: 69
Canada
Quote:

I tried your code above and would get an error before the 1st frame. So I re-wrote it kinda. And now it runs with no errors but I dont see the tiling sprites


function tile_sprite (amount_of_tiles, tile_width) {
var amount_of_tiles = 15;
var tile_width = 512;
var counter;
while (counter < amount_of_tiles) {
//put a tile on an increasing x-axis position
ent_create ("water.pcx", vector (counter * tile_width, 0, 0), null);
counter += 1;
}

}





bump for more help, whats wrong here?

Re: Tileing a sprite [Re: Leaf] #137547
06/27/07 19:42
06/27/07 19:42
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
check my contribution about laser targeting... maybe will help
Link


Never say never.

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

Gamestudio download | chip programmers | 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