Aller au contenu

Photo

Preset Variables on Sounds?


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

#1
DragonTayl

DragonTayl
  • Members
  • 34 messages
I am wondering if anyone knows if there are "issues" with storing variables on sound placeables? I have a script that is trying to read variables off a placed sound, but all I get are the default "on error" results (blank strings, 0 ints, etc.)

The same script is having no trouble reading variables off the area. 

#2
wyldhunt1

wyldhunt1
  • Members
  • 246 messages
I've never tried, but my gut says that it probably won't work.
I don't recall an OBJECT_TYPE_SOUND constant (Though I may be wrong).

What are to trying to do, exactly?

EDITED FOR CONTENT:

I have a weather system that uses a lot of custom sounds that are controlled by variables.
The way it works is with waypoints. I place all of my variables on waypoints, and then reference them for all of the variables I need for the weather in that area, including sounds.

Modifié par wyldhunt1, 17 décembre 2011 - 02:40 .


#3
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
It looks like any varaiables that are placed in the toolset are lost. I have had no problem with locals that i have placed on the sound Object via script.

Note: Sounds are not "Placeables Objects" they are "Sound Objects". Just minor nit picking.

#4
wyldhunt1

wyldhunt1
  • Members
  • 246 messages
That's interesting to note...
Thanks for checking that, Lightfoot8.

#5
Xardex

Xardex
  • Members
  • 217 messages
I like to use waypoints with non-ambient/not-always playing sound objects. You can use the waypoints locals to point to the soound object and store the sounds variables to the waypoint aswell.

#6
DragonTayl

DragonTayl
  • Members
  • 34 messages
Yeah, using waypoints instead of sounds worked. I was using them for spawn points because they're a very visual representation of a radius. I had originally been using waypoints, but tried using some sounds so I could see the radius (I was using a random location near script)