Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,395 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
High grass script? #414070
12/22/12 08:05
12/22/12 08:05
Joined: Nov 2012
Posts: 32
T
thorus Offline OP
Newbie
thorus  Offline OP
Newbie
T

Joined: Nov 2012
Posts: 32
hy guys, anyone know where i can find a grass placing script for Lite_c ? or how should i fill all the green plains with high grass? thanks

Re: High grass script? [Re: thorus] #414080
12/22/12 15:21
12/22/12 15:21
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
you can find the "infinite terrain" script in samples folder. it places sprites and models onto terrain at random positions in a given qusantity.

if you want to cover only a specific area of the terrain, you should use c_trace with SCAN_TEXTURE to check which texture is hit at given position, or tetxure colour at hit position.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: High grass script? [Re: sivan] #414089
12/22/12 19:33
12/22/12 19:33
Joined: Nov 2012
Posts: 32
T
thorus Offline OP
Newbie
thorus  Offline OP
Newbie
T

Joined: Nov 2012
Posts: 32
thanks, but when i try that.. it doesnt work i get a error when i use the script with my level.wmb,

couse in the script they use a level_("terrain.hmp");

how can i change the script
action place_grass()
{
vec_scale(my.scale_x,0.1+random(0.1));
ent_terrain_place(my,level_terrain,0,55); <--- here i get an error!!!!!
my.alpha = 70;
my.flags |= PASSABLE | TRANSLUCENT;
my.eflags |= CLIP1; // clip away at 50% LOD range
my.emask &= ~DYNAMIC;
}
that it work also with wmb, atm it works with hmp..

thanks

Re: High grass script? [Re: thorus] #414091
12/22/12 20:28
12/22/12 20:28
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
if your wmb contains a terrain, in the main script define: ENTITY* terrain_entity; , create an action that contains: terrain_entity = me; , assign this action to the terrain in WED Properties menu, then you can put this name into ent_terrain_place(my, terrain_entity,0,55); it should work fine.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: High grass script? [Re: sivan] #414096
12/22/12 21:03
12/22/12 21:03
Joined: Nov 2012
Posts: 32
T
thorus Offline OP
Newbie
thorus  Offline OP
Newbie
T

Joined: Nov 2012
Posts: 32
hi, thanks for the fast answer but the next problem is, i use a multitex3 shader already for the terrain, so the action slot in map probs.. is gone smirk

any clue how to fix that? please ? laugh

Re: High grass script? [Re: thorus] #414098
12/22/12 21:34
12/22/12 21:34
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
you can set the shader in your new action by: fx_terraintex3(); , or by: my.material = mtl_terraintex3; , or if you have a MATERIAL* declared and assigned already for the terrain put there a line: effect="terraintex3.fx";


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: High grass script? [Re: sivan] #414105
12/23/12 08:07
12/23/12 08:07
Joined: Nov 2012
Posts: 32
T
thorus Offline OP
Newbie
thorus  Offline OP
Newbie
T

Joined: Nov 2012
Posts: 32
thanks for your time, but there spawn no gras smirk no error but no gras here smirk
here the code:
#define NUM_GRASS 4000

ENTITY* level_terrain; // the current terrain

Code:
action blabla() <------- this action i have on my terrain in the level! 
{
	level_terrain = me;
	fx_modelTex3Nm();
}

action place_grass()
{
	vec_scale(my.scale_x,0.1+random(0.1));
	ent_terrain_place(my,level_terrain,0,55);
	my.alpha = 70;
	my.flags |= PASSABLE | TRANSLUCENT;
	my.eflags |= CLIP1; // clip away at 50% LOD range
	my.emask &= ~DYNAMIC;
}
function_main()
{
        level_load("lost_lands.wmb");
	int i;
	for (i=0; i < NUM_GRASS; i++)
	ent_create("grass_x3.dds",NULL,place_grass);
	wait(1);
}



please help laugh

Last edited by thorus; 12/23/12 08:31.
Re: High grass script? [Re: thorus] #414182
12/25/12 09:41
12/25/12 09:41
Joined: Nov 2012
Posts: 32
T
thorus Offline OP
Newbie
thorus  Offline OP
Newbie
T

Joined: Nov 2012
Posts: 32
have done, thanks anyway


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