Permissions
|
|
Sollie Villota
Registered User
Join date: 22 Jun 2007
Posts: 46
|
08-16-2007 20:24
OK I am stumped again.
My issue is permissions with my HUD again.
My HUD is a combat HUD and when you die it takes control permissions so you can't move for a set amount of time. BUUUUT...after you "revive" after the time and it releases the hold on your controls, it takes away the current gun permissions and then I have to re-equip it.
I theorized i could maybe HOLD the original permissions in a variable and then call that variable again later after the HUD's control permissions get released.
Unless there's other ways around this. I know its possible, but yeah...its just another block. Any help will be grateful! Thanks.
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
08-16-2007 20:34
I've not tried it on a HUD, but I know that an normal attached object (and I would then imagine a HUD) will effectively stop movement on calling an llMoveToTarget(llGetPos()); You'd have to continuously poll and check it while the avatar is "dead", but it's one solution.
Another solution is to make your gun recognize when permissions have been removed and then re-acquire them.
IE...
run_time_permissions(integer perms) { if(perms & perms_i_want) return; else //get perms_i_want; }
Of course...in my opinion, a dead person should be allowed to move. I mean, what if the killer wants to drag them off somewhere? It'd be kinda hard to RP that out...wouldn't it?
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|
|
Sollie Villota
Registered User
Join date: 22 Jun 2007
Posts: 46
|
08-16-2007 20:57
Hey thanks, that llMoveToTarget will work perfectly, I totally didn't think of it. Right now the HUD is just used for a combat place, and thats it. No RPing with it. Thanks again. I'll try it.
|
|
Sollie Villota
Registered User
Join date: 22 Jun 2007
Posts: 46
|
08-17-2007 01:02
Ok I need to ask another question X.X. May I see an example of llMoveToTarget(llGetPos(), 0); in use correctly? I thought I had it but ... I don't.
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
08-17-2007 02:43
From: Sollie Villota Ok I need to ask another question X.X. May I see an example of llMoveToTarget(llGetPos(), 0); in use correctly? I thought I had it but ... I don't. that's correct, tho I'd use a tau of 0.05 or so. there's a gotcha here, an llMoveToTarget will not affect your avatar right after compiling a script in an attachment. You have to remove the attachment then re-attach it to get it working.
|
|
Sollie Villota
Registered User
Join date: 22 Jun 2007
Posts: 46
|
08-17-2007 10:13
Thanks for the help. But I'm still having trouble. Here's basically what I'm doing.. When you die, it goes to a new state for a set amount of seconds. I believe i'm doing this terribly wrong to get the thing to make you stop moving when you die... state dead { state_entry() { llSetTimerEvent(deathtime); llSay(0, "Dead!"); llSleep(deathtime); llStopAnimation(fall_anim_fwd); state default; } timer() { llMoveToTarget(llGetPos(), 0.05); } }
I know this is wrong, but usually I find a way around issues lol.
|
|
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
|
08-17-2007 11:08
I'd try something like this state dead { state_entry() { llStartAnimation(fall_anim_fwd); llMoveToTarget(llGetPos(), 0.05); llSetTimerEvent(deathtime); llSay(0, "Dead!"  ; } timer() { llStopAnimation(fall_anim_fwd); llStopMoveToTarget(); llSay(0, "You are alive again, GO!"  ; state default; } }
|
|
Sollie Villota
Registered User
Join date: 22 Jun 2007
Posts: 46
|
08-17-2007 11:56
THANK YOU! I think this is my last issue with this, it works PERFECT!
I can't thank you enough!
|
|
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
|
08-17-2007 15:00
no prob, glad it helped
|