scipt belt help
Moderator: Core Staff
-
- CJ Wannabe
- Posts: 9
- Joined: June 28th, 2010, 2:02 pm
scipt belt help
Hello everyone I need help to put a conveyor belt like this (http://www.youtube.com/watch?v=JBtc9OJiUUE) on my map who can help me?
Re: scipt belt help
Ciao Alfio!
Hi know him and he's italian so i explain this in ita
Allora io ho creato qualcosa di simile usando questo codice
quello che devi fare in codradiant è creare tanti sciptbrushmodel( io ad esempio ne ho creati 35) di larghezza 32 (se vuoi cambiare la larghezza ricorda però di cambiarla anche nel codice ...tipo se vuoi farli di 40 metti self moveTo((self.origin+(40, 0, 0)), .1);
questi scriptbrushmodel mettili uno sopra l'altro in radiant(stesse cordinate x,y,z)
nella mappa poi questo "belt"comparirà nelle cordinate segnate dal self.origin)l'ultima parte del codice)
spero di esserti stato utile...se hai problemi contattami su xfire
Hi know him and he's italian so i explain this in ita
Allora io ho creato qualcosa di simile usando questo codice
Code: Select all
main()
{
thread startbelts();
}
startbelts()
{
belts = getEntArray("belt", "targetname");
for (j = 0; j < belts.size; j++)
{
belts[j] thread belt();
wait .1;
}
}
belt()
{
while(1)
{
self moveTo((1000, 1000, 1000), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self moveTo((self.origin+(32, 0, 0)), .1);
wait .1;
self.origin = (1032, 1000, 1000);
}
}
questi scriptbrushmodel mettili uno sopra l'altro in radiant(stesse cordinate x,y,z)
nella mappa poi questo "belt"comparirà nelle cordinate segnate dal self.origin)l'ultima parte del codice)
spero di esserti stato utile...se hai problemi contattami su xfire

Re: scipt belt help
Why not like this:
Code: Select all
belt()
{
while(1)
{
self moveTo( end_point, time_in_seconds );
wait time_in_seconds - 0.1;
self.origin = start_point;
}
}
Re: scipt belt help
but on mp_codjumper_training, that "belt" doesn't move smoothly, thus doesn't look as beautiful as it could.
-
- CJ Wannabe
- Posts: 9
- Joined: June 28th, 2010, 2:02 pm
Re: scipt belt help
I found this script
belt()
{
belt1 = getentarray("belt","targetname");
for(i=0;i<belt1.size;i++)
belt1 thread belt_move();
}
belt_move()
{
org_end = (4866,-257,-36);
org_start = (-168,-257,-36);
while(1)
{
self moveto ((self.origin + (64,0,0)), 0.05);
if(self.origin == org_end)
{
self hide();
self notsolid();
self moveto(org_start, 0.05);
}
self waittill ("movedone");
self show();
self solid();
}
}
I created a piece in radians, set TargetName belt; I see the carpet in the game to move endlessly in one direction, what did I do wrong?
belt()
{
belt1 = getentarray("belt","targetname");
for(i=0;i<belt1.size;i++)
belt1 thread belt_move();
}
belt_move()
{
org_end = (4866,-257,-36);
org_start = (-168,-257,-36);
while(1)
{
self moveto ((self.origin + (64,0,0)), 0.05);
if(self.origin == org_end)
{
self hide();
self notsolid();
self moveto(org_start, 0.05);
}
self waittill ("movedone");
self show();
self solid();
}
}
I created a piece in radians, set TargetName belt; I see the carpet in the game to move endlessly in one direction, what did I do wrong?
-
- Core Staff
- Posts: 13315
- Joined: April 13th, 2005, 8:22 pm
- Location: UK, London
Re: scipt belt help
org_end = (4866,-257,-36);
org_start = (-168,-257,-36);
You need these coordinates to be correct for your map.
org_start = (-168,-257,-36);
You need these coordinates to be correct for your map.

Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010
-
- CJ Wannabe
- Posts: 9
- Joined: June 28th, 2010, 2:02 pm
Re: scipt belt help
belt()
{
belt1 = getentarray("belt","targetname");
for(i=0;i<belt1.size;i++)
belt1 thread belt_move();
}
belt_move()
{
org_end = (512,-464,-14);
org_start = (-672,-464,14);
while(1)
{
self moveto ((self.origin + (64,0,0)), 0.05);
if(self.origin == org_end)
{
self hide();
self notsolid();
self moveto(org_start, 0.05);
}
self waittill ("movedone");
self show();
self solid();
}
}
ok this is my script with the correct coordinates, but the tape continues to move indefinitely without returning to the starting point What's wrong?
{
belt1 = getentarray("belt","targetname");
for(i=0;i<belt1.size;i++)
belt1 thread belt_move();
}
belt_move()
{
org_end = (512,-464,-14);
org_start = (-672,-464,14);
while(1)
{
self moveto ((self.origin + (64,0,0)), 0.05);
if(self.origin == org_end)
{
self hide();
self notsolid();
self moveto(org_start, 0.05);
}
self waittill ("movedone");
self show();
self solid();
}
}
ok this is my script with the correct coordinates, but the tape continues to move indefinitely without returning to the starting point What's wrong?
-
- CJ Wannabe
- Posts: 9
- Joined: June 28th, 2010, 2:02 pm
Re: scipt belt help
an scipt_origin or bush with orig texture (orange)
can explain to me what I need to create on radiant, thanks
can explain to me what I need to create on radiant, thanks
Who is online
Users browsing this forum: No registered users and 1 guest