Page 1 of 2

moveto and loopsound commands arent working!

Posted: Sat Aug 21, 2004 4:56 pm
by Master-Of-Fungus-Foo-D
whenever i make, lets say, a speaker to play a sound, in my script it type:

Code: Select all

$speaker loopsound berlin
it doesnt do ANYTHING! and when i make, lets say, a box looking boat
and i type this in my script:

Code: Select all

$boxboat moveto $otherdock
IT WONT MOVE! :evil: :evil: :evil: :evil:
what is wrong with my script?

Posted: Sat Aug 21, 2004 5:00 pm
by lizardkid
lol for one, unless you have AI for your boat (which you dont) then you need to specify waypoints for it to move on that connect to eachother via targetname and target.

as for your speaker, i dont think berlin is a real sound clip, you'll have to find a real one.

Posted: Sat Aug 21, 2004 5:04 pm
by Master-Of-Fungus-Foo-D
WOW! fast response lol

i KNOW berlin isnt a real sound clip. youd rather i waste 10 minutes going into main/pak3.pk3/sound/amb/hedgelimpacts_03.wav?

oh! so the boat needs to target the waypoint?

Posted: Sat Aug 21, 2004 5:05 pm
by jv_map
Na just add a line:

$boxboat waitmove

:)

Posted: Sat Aug 21, 2004 5:06 pm
by Master-Of-Fungus-Foo-D
:? waddaya mean?

Posted: Sat Aug 21, 2004 5:50 pm
by lizardkid
jv he's trying to get it to move to another dock, waitmove would make it wait til it stopped moving right?

think what you need to do is make a set of waypoints to the other dock and then use

$boat moveto $wapoint1
$boat waitmove
// do whatver

Posted: Sat Aug 21, 2004 5:52 pm
by Bjarne BZR
Master-Of-Fungus-Foo-D wrote::? waddaya mean?
He means ( I think ) that the command you use:

Code: Select all

$boxboat moveto $otherdock
Is a command that tells the object where to go, it does not tell it to start moving however... so you need to tell the object to move to the place you told it as well:

Code: Select all

$boxboat waitmove
... so yoyr complete move code should be:

Code: Select all

$boxboat moveto $otherdock // Where to go
$boxboat waitmove // Go now!
:)

The code above also coundts on the following:
1) That there is an entity ( like a script_model or a script_object ) in your map with targetname / boxboat ( something to move, that is).
2) That there is an entity ( like a script_origin ) in your map with targetname / otherdock ( something to move to, that is).

Check this link for some help on how to use somee of the most common script commands (like move and waitmove)

Posted: Sat Aug 21, 2004 8:32 pm
by Master-Of-Fungus-Foo-D
Hey thx bjarne! ill bet that'll work. And yes, i looked at the scripting appendixes b4 posting.

those targetnames were just examples lol! im not THAt st@@pid :lol: :lol: :lol: :lol:

Posted: Sun Aug 22, 2004 3:08 pm
by Master-Of-Fungus-Foo-D
IT WORKED IT WORKED! id say something original, but id rather quote Lt. Niel:

THANK YOU THANKYOU! MAY YOUR HAIR NEVER THIN AND YOUR GUT GROW OUT OF YOUR CONTROL!!!!!


lol niel's hilarious ain't he.

Posted: Sun Aug 22, 2004 3:49 pm
by Bjarne BZR
LOL

Posted: Mon Aug 23, 2004 5:36 pm
by Master-Of-Fungus-Foo-D
dont laugh at me laugh at lt. nel. :) :) :) :)

loopsound

Posted: Mon Aug 23, 2004 9:38 pm
by tltrude
Sometimes loopsounds have a hard time loading before the game starts. Or, it could be that the sound just can't fine the speaker object in time. Anyway, what I do is put them in a thread with a short wait.

start_sounds:

wait 1
$speaker1 loopsound berlin
$speaker2 loopsound river

end

Posted: Tue Aug 24, 2004 1:31 am
by Master-Of-Fungus-Foo-D
mmm good idea..... ill try that

Posted: Tue Aug 24, 2004 1:52 am
by Master-Of-Fungus-Foo-D
Wow! tltrude! it worked... you deserve some of lt. niels wise words too...

Master-Of-Fungus-Foo-D wrote:IT WORKED IT WORKED! id say something original, but id rather quote Lt. Niel:

THANK YOU THANKYOU! MAY YOUR HAIR NEVER THIN AND YOUR GUT GROW OUT OF YOUR CONTROL!!!!!


lol niel's hilarious ain't he.

Gods

Posted: Tue Aug 24, 2004 5:48 am
by tltrude
The hair and gut wish is wasted on me, but a short prayer to the Cyber Gods on my behalf would be nice!