Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   play() as a player comes online (https://forums.graalonline.com/forums/showthread.php?t=75085)

JkWhoSaysNi 07-03-2007 10:51 PM

play() as a player comes online
 
I have a weapon NPC that all players get. In onCreated I have:

PHP Code:

play("http://location-to/song.mp3"); 

It works if I update the script and get the onCreated event called way after login, but it seems that calling play() right after login gives this error in the F2 window:

FMod Sounds: using default sound driver
FMod Sounds: error when playing http://www.songarea.com/music-code/n...693cba6943.mp3

The URL there is also not the URL of the song i'm trying to play. Logon to graalaxy and you'll see the problem.

Inverness 07-03-2007 11:23 PM

Put in a sleep()? *shrug*
Or do scheduleevent()

JkWhoSaysNi 07-03-2007 11:33 PM

yeah that seemed to fix it, don't see why it's necessary though.

Rapidwolve 07-03-2007 11:42 PM

Most likely because Graal needs time to initialize. I'm not sure.


All times are GMT +2. The time now is 11:33 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.