Page 1 of 2

Problem with scripts

Posted: August 23rd, 2006, 4:22 pm
by All-Killer
Hi

I have a problem i asked nightmare to teach me how to make totating poles and it doenst work whats the prob?

I called the rotating things jm_woods_spinning1 and 2

this is the script:

Code: Select all

main()
{
maps\mp\_load::main();
maps\mp\jm_woods_spin1::main();
maps\mp\jm_woods_spin2::main();
}

jm_woods_spin1()
{
spin = getent("jm_woods_spinning1","targetname"); 
while (1)
{

spin rotateyaw(-360, 5);

spin waittill("rotatedone");
}
}

jm_woods_spin2()
{
spin = getent("jm_woods_spinning2","targetname"); 
while (1)
{

spin rotateyaw(-360, 5);

spin waittill("rotatedone");
}
}

Nightmare cant just see whats the problem please help me and my maps wil be very cool :wink:

Posted: August 23rd, 2006, 4:31 pm
by Nightmare
I see whats the problem now, here try this script:

Code: Select all

main()
{
maps\mp\_load::main();

thread jm_woods_spin1();
thread jm_woods_spin2();
}

jm_woods_spin1()
{
spin = getent("jm_woods_spinning1","targetname");
while (1)
{

spin rotateyaw(-360, 5);

spin waittill("rotatedone");
}
}

jm_woods_spin2()
{
spin = getent("jm_woods_spinning2","targetname");
while (1)
{

spin rotateyaw(-360, 5);

spin waittill("rotatedone");
}
} 
that should work

Posted: August 23rd, 2006, 4:40 pm
by Drofder2004
Rename all your spinning poles to "jm_woods_spinning" and use this code. To make more poles, simply just give them the same targetname.

Code: Select all

main()
{
maps\mp\_load::main();

spin = getentarray("jm_woods_spinning","targetname");
for(i=0;i<spin.size;i++)
{
   spin thread jm_woods_spin();
}
}

jm_woods_spin()
{
while (1)
{
self rotateyaw(-360, 5);
self waittill("rotatedone");
}
}

Posted: August 23rd, 2006, 4:56 pm
by All-Killer
Thanks guys. I will test drofders way because its easyer for me. And again, thanks for the help nm :wink:

Hmm it still dont work...

Posted: August 23rd, 2006, 5:10 pm
by creator
think ur problem is: u didnt put thread in it

Posted: August 23rd, 2006, 5:32 pm
by All-Killer
Yeah nightmares one works. I think i will post some pics today otherwise tomorrow

Posted: August 23rd, 2006, 5:33 pm
by Nightmare
NM: 1 Drof: 0

:P

Posted: August 23rd, 2006, 5:41 pm
by Drofder2004
All-Killer wrote:Thanks guys. I will test drofders way because its easyer for me. And again, thanks for the help nm :wink:

Hmm it still dont work...
did you get an error or did you just not rename all the targetnames?

Scripting looks fine.

Nightmare, your way is redundant. Every new entity All-Killer adds will require another thread, my way supports infinite entities :P

Posted: August 23rd, 2006, 5:42 pm
by creator
the problem was: nightmare didnt had 'thread' in his script he edited after i said that :P works fine now right all killer? 8)

Posted: August 23rd, 2006, 5:45 pm
by Drofder2004
creator wrote:the problem was: nightmare didnt had 'thread' in his script he edited after i said that :P works fine now right all killer? 8)
I'm not talking about nightmares script, his script runs fine (as AK has said), mine is not working for him, which imo is the more professional and less redundant method.

Posted: August 23rd, 2006, 7:07 pm
by All-Killer
No i dont get an error but my pillars jus dont rotate. I did what you said and it don't work. But i must say that youre script was easyer to use. I can send you the .map and you can try it yourself. If it than works i really dont know whats the problem, because it doesn't work by me.

P.S. new screens --> http://www.freewebs.com/all-killer/akwoodsgallery.htm

Posted: August 27th, 2006, 7:14 am
by profinuyasha
lol now i know what different about rotate :P, one of rotate are fun!!!! i showed it to some of CJ of spawn_v4.pk3 and its awesome :P

if you want spin in X Axis or Y Axis then you gonna use rotatepitch instead rotateyaw

Posted: August 27th, 2006, 7:17 am
by profinuyasha
Old Nightmare wrote:NM: 1 Drof: 0
err...i dont think so....DROF WIN!

also he mean this......
New Nightmare wrote:NM: 0 Drof: 1

Posted: August 27th, 2006, 2:02 pm
by Nightmare
um did you read? drofs script didnt work for him :?
so its still
nm:1 drof: 0

:D

Posted: August 27th, 2006, 2:20 pm
by Drofder2004
Erm, I think the fact I just got you a working wheel thingy, that it is actually

Me > you.

I have no definite number. My posts are mainly in these forums and look at my post count ;)