Aller au contenu

Photo

Is possible to create sounds by CreateObject() function?


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

I want to create the sound resref ="campfire" is possible to create it by typing:

 

object oSound = CreateObject(OBJECT_TYPE_PLACEABLE, "campfire", lLocation);

DelayCommand(fDelay, DestroyObject(oSound));

 

???



#2
Fester Pot

Fester Pot
  • Members
  • 1 394 messages

The best way to go about this, when a campfire is created - if your locations are static campfires - is to simply place the sound and make it not active. Then, turn it on via a script.

 

If a character can create a campfire anywhere in an exterior area, then yes, you can create a sound placeable using its resref.

Just remember to use DestroyObject(GetNearestObjectByTag("TAG_NAME") to destroy the nearest sound placeable to the camp location when the campfire is doused.

FP!


  • WhiteTiger aime ceci

#3
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

Fester Pot, OK. I'll try do it.



#4
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

If a character can create a campfire anywhere in an exterior area, then yes, you can create a sound placeable using its resref.

 

Does not work. I tried this:

object oSound = CreateObject(OBJECT_TYPE_PLACEABLE,"campfire",GetLocation(OBJECT_SELF));

I can't listen to the sound of campfire

 

I guess because it isn't PLACEABLE and it is SOUND.

 

How to play sound al_cv_firecamp1 by 60 seconds?



#5
Fester Pot

Fester Pot
  • Members
  • 1 394 messages

Bummer. Figured it would work. Oh well. :(

 

FP!



#6
WhiteTiger

WhiteTiger
  • Members
  • 479 messages

I need to loop a campfire sound. The string of the sound is "al_cv_firepit1"