moveto and loopsound commands arent working!

Post your scripting questions / solutions here

Moderator: Moderators

Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

moveto and loopsound commands arent working!

Post 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?
Last edited by Master-Of-Fungus-Foo-D on Sat Aug 21, 2004 5:34 pm, edited 1 time in total.
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post 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?
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Na just add a line:

$boxboat waitmove

:)
Image
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

:? waddaya mean?
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post 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)
Admin .MAP Forums
Image
Head above heels.
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post 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:
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post 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.
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

LOL
Admin .MAP Forums
Image
Head above heels.
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

dont laugh at me laugh at lt. nel. :) :) :) :)
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

loopsound

Post 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
Tom Trude,

Image
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post by Master-Of-Fungus-Foo-D »

mmm good idea..... ill try that
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
Master-Of-Fungus-Foo-D
Muffin Man
Posts: 1544
Joined: Tue Jan 27, 2004 12:33 am
Location: cali, United States

Post 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.
Image
The Fungus Theme song!!!

Code: Select all

while (local.player istouching self)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Gods

Post 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!
Tom Trude,

Image
Post Reply