Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant), 5,825 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
need a (hopefully) simple script #175656
12/31/07 22:57
12/31/07 22:57
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
i was wondering if some one could make a clip range script...
criteria(hope i dont sound picky)
-clips grass models at a close distance
-does not clip trees
(in other words make the engine clip a set of certain models.)
-does not clip terrain

i realy hope im not asking for too much. it would be a wonderful service if some one would do this for me, becaus i have yet to learn how to program clip ranges.

thanks!


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: need a (hopefully) simple script [Re: not_me] #175657
12/31/07 22:59
12/31/07 22:59
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
WHOOPS! Posted this in the wrong forum...just noticed that...can somebody move it to user requests? pls

Last edited by not_me; 12/31/07 23:00.

-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: need a (hopefully) simple script [Re: not_me] #175658
01/01/08 01:13
01/01/08 01:13
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
I remember something like this from a recent post (maybe 3 months ago) where the solution was given but cant recall the post or the poster sorry.

Re: need a (hopefully) simple script [Re: Nems] #175659
01/01/08 17:38
01/01/08 17:38
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
hello this works but it isnt the right way but it does work

var clip_dist;

action clip_my
{
while(1)
{
if(vec_dist(my.x,camera.x) > clip_dist)
{my.flag1 = on;}
else{my.flag1 = off;}
wait(1);
}
}

function clip_it()
{
clip_dist = 1000;//clip_dist
//fog is nicer
fog_color = 1;
camera.fog_start = 0.8 * clip_dist;
camera.fog_end = 0.9 * clip_dist;
camera.noflag1 = on;
}
function main()
{
//lvl_load, etc.
clip_it();
}

i forgotten the magic word, but its better because it dont need a whileloop


"empty"
Re: need a (hopefully) simple script [Re: flits] #175660
01/02/08 05:27
01/02/08 05:27
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
i get an error..it says
malfunction w1501

empty pointer in clip_it:my.pan=sin(lv_sin)*lv_power
what should i do? by the way i like the script...its pretty flexible...i added a swey to it so my grass still sweys in the wind.


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: need a (hopefully) simple script [Re: not_me] #175661
01/02/08 16:51
01/02/08 16:51
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
i dont know what you did but you need to call the clip_it fucntion run it 1 time after a level_load and dont add stuff

and you need to add this to the grass action/function
i dont have a line "my.pan=sin(lv_sin)*lv_power" so if it still doesnt work post here you script

while(1)
{
if(vec_dist(my.x,camera.x) > clip_dist)
{my.flag1 = on;}
else{my.flag1 = off;}
wait(1);
}


"empty"
Re: need a (hopefully) simple script [Re: flits] #175662
01/03/08 00:05
01/03/08 00:05
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
ha i got it to work...i backed all the way up. recopied the script you gave me. turned action clip_my to function clip_my then in my grass action i called them.
something like this

action ent_swey
{
//action stuff...
clip_my();
clip_it();
}

and it works like a charm! thanks!


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: need a (hopefully) simple script [Re: not_me] #175663
01/03/08 09:47
01/03/08 09:47
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
the clip_it(); has only to be called 1 time after the level_loading but that isnt realy a problem


"empty"
Re: need a (hopefully) simple script [Re: flits] #175664
01/07/08 05:16
01/07/08 05:16
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas



-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Re: need a (hopefully) simple script [Re: not_me] #175665
01/12/08 05:49
01/12/08 05:49
Joined: Sep 2005
Posts: 508
Texas
not_me Offline OP
User
not_me  Offline OP
User

Joined: Sep 2005
Posts: 508
Texas
quick question...i want the objects to be invisible when out of the clip range so the engine doesnt render them in rutime. how should i do this...ive tried a few ways but they dont work for me...


-Initiate Games
-Level designer

http://www.sckratchmagazine.com
Page 1 of 2 1 2

Moderated by  adoado, checkbutton, mk_1, Perro 

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