|
Vaelin Reitveld
Many ideas, no talent
Join date: 29 Jul 2005
Posts: 7
|
07-22-2006 16:20
Ok... I'll start off by saying that when it comes to scripting, I have great ideas, but no clue how to make them work. I am a resident of Elven Glen and ElfHaven and thus cannot use technological items... but I want to open a portrait studio... here's my idea and I hope maybe someone can help point me in the right direction where to go with it... I want to be able to create a script that can be inserted into a wand-type item that will also use a particle emitter script (got that already) any time a snapshot is taken... thus creating the illusion that I am taking a picture by magic (everyone will know otherwise, but it's the concurrence with the land theme that counts). Can anyone tell me if this can be done at all and if so, how? Please advise. Responses via email are preferred, as it can be sometimes difficult for me to get to these forums. Thanks. Email provided below. ~Vaelin Reitveld~
[email]maida.parkinson@navy.mil[/email]
|
|
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
|
07-22-2006 23:32
From: Vaelin Reitveld ...I want to be able to create a script that can ... any time a snapshot is taken... thus creating the illusion that I am taking a picture by magic... The scripting language can't currently detect when a picture is taken.
|
|
Vaelin Reitveld
Many ideas, no talent
Join date: 29 Jul 2005
Posts: 7
|
RE: Request for scripting assistance
07-26-2006 16:49
Ok... thanks... guess I'll just have to figure out a different way to do it... perhaps altering a particle emitter so that it will function for a set timeframe when a command word is spoken (like a spell)... thanks anyway 
|
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
07-27-2006 09:28
From: Angela Salome The scripting language can't currently detect when a picture is taken. The avatar does a camera-snap animation, doesn't it? llGetAnimationList may be able to detect that. ==Chris
|
|
SunenRec Ayoob
Registered User
Join date: 29 Dec 2004
Posts: 61
|
07-27-2006 10:47
From: Christopher Omega The avatar does a camera-snap animation, doesn't it? llGetAnimationList may be able to detect that. ==Chris It can indeed! The following script will detect when the snapshot anim is being played. The duration of the timer event may need some tweaking depending on how quickly you want the animation to be detected. If you're using a seperate script for the particle effect you could use llMessageLinked to trigger the other script (or you can just paste the particle system command straight into the take_snapshot function) key snapshot_anim = "eae8905b-271a-99e2-4c0e-31106afd100c"; key owner; list anims; take_snapshot() { llSetTimerEvent(0); // // insert code to do stuff here! // llSetTimerEvent(1); } default { state_entry() { owner = llGetOwner(); llSetTimerEvent(1); } timer() { anims = llGetAnimationList(owner); if (llListFindList(anims, [snapshot_anim]) != -1) take_snapshot(); } } Unfortunately, as the snapshot animation isn't played until you save the snapshot (to inventory or hard drive) this method won't allow you to trigger anything that would play while you're in the snapshot preview positioning the camera, etc. (in case that's what you were aiming to do) Sun.
|
|
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
|
07-27-2006 16:37
Nifty!
|
|
Vaelin Reitveld
Many ideas, no talent
Join date: 29 Jul 2005
Posts: 7
|
07-27-2006 16:51
Thanks for all the help... and no, I wasn't looking for something that would activate while I was positioning... just when I actually save (create) the picture... kind of like a camera flash... but in this case, a magic-spell version. Thanks again for everyone who helped! Be sure to come by Elven Glen and Elf Haven sometime to see how it works out!
~*~ Vaelin Reitveld ~*~
|