Defensive Shield Script
|
Nekose Mackenzie
Junior Member
Join date: 23 Jul 2004
Posts: 4
|
07-24-2004 21:04
Alright, I just recently joined SL, and let me first say i'm having an awsome time. Im really impressed with the level of customization this world allows.
anywho, on to my story. While playing around in the sand box, making all sorts of interesting things. Some other guy started shooting me with some kind of push gun. After a while it started to annoy me. Eventualy the guy left, but i was now determined to come up with a way to stop that from happening.
So for my first scripting task, i've decided to make some kind of active shield system. I plan on linking two spheres together. When something passes through the outside sphere i want it to "rez" in the inside sphere, and thus stop the bullet from hitting me. Unfrotunetly, i really dont even know where to start... does anyone have any suggestions, or example scripts i could look at?
|
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
|
07-24-2004 23:09
Not what you're asking for, but what I use, something like: default { state_entry() { llMoveToTarget( llGetPos(), 0.2 ); } }
Basically get it to listen for "lock"/"unlock" - or detect when youre pressing a move key (CO's version) - and call llMoveToTarget/ llStopMoveToTarget appropriately. Wednesday put a script for this in the core Scripting Library. Azelda
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
07-25-2004 01:46
Here's a direct link to the thread about it in the Script Library: /15/30/7320/1.html
|
Nekose Mackenzie
Junior Member
Join date: 23 Jul 2004
Posts: 4
|
07-25-2004 15:52
this is along the right lines, and i might incorprate it into the script. but i was looking for something a little more flashy. I saw a fellow dressed in a green lantern outfit with the exact kind of shield i was trying to make. When he was casualy walking around, you couldnt see anything, but as soon as something impacts the shield, a barrier rez's in to stop the bullet.
|
Random Fortune
Junior Member
Join date: 28 Jun 2003
Posts: 15
|
Shield / anchor
07-26-2004 20:33
Hi, I happened to buy a few shields, the flashiest was by a chap by the name of sion. Very flashy, but can still be breached. I have tried overlapping different types of shields, and anchors, but still get knocked out of the shields.(lag maybe) Its fun to mess around with.  RANSOM
|
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
|
07-26-2004 22:23
It's pretty easy to build projectiles that go through anything.
Azelda
|
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
|
07-26-2004 22:53
A few notes for designing a shield system:
1) llMoveToTarget( llGetPos(), 0.2 ) is going to need to be the core of any anti-push system. I've got a pushgun that doesn't need a projectile; no shield is going to stop that. 2) Scripts won't react fast enough to let an inner shield rez to block a projectile that's just gone through an outer shield. 3) Fast-moving projectiles can go through fairly thick shields 4) Non-physical projectiles can go through any shield.
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
|
Goshua Lament
Registered User
Join date: 25 Dec 2003
Posts: 703
|
07-26-2004 22:53
From: someone Originally posted by Azelda Garcia It's pretty easy to build projectiles that go through anything. I got one of Moopf's jetpacks and at full speed, I could fly through any solid object with ease. Is there any way to make a 100% working sheild?
_____________________
Flickr Second Life Photo GalleryI no longer regularly login to SecondLife, but please contact me if an issue arises that needs my attention.
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
07-26-2004 23:10
From: someone Originally posted by Goshua Lament Is there any way to make a 100% working sheild? Nope* *only real defense against getting shot is to log off
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|
Nekose Mackenzie
Junior Member
Join date: 23 Jul 2004
Posts: 4
|
07-27-2004 01:43
where there a will there's a way. and for every gun improvement, im sure someone has found a way to stop it, and vice versa.
|
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
|
07-27-2004 02:50
Nooo, you cant defend against phantom non-physical projectiles, unless you count running away as defending yourself.
Azelda
|
Adam Zaius
Deus
Join date: 9 Jan 2004
Posts: 1,483
|
07-27-2004 04:28
When you sit down, your hitbox becomes that of what your sitting on (your own av does not count towards this). Just sit on a hollow, twice cut, 0.01x0.01x0.01 torus, with a sit-script in it, that means it's fairly distant from yourself. (delete the script after setting sit pos, so it wont show up on any 'scripted object' finders.)  -Adam
|
Higbee Protagonist
Yggdrai Ranger
Join date: 7 Aug 2003
Posts: 266
|
07-27-2004 10:30
The off-the-cuff comments are crakin me up! lol Nekrose on your "flashy" shield tho I do have the actuality of what you are seeing. From: someone I saw a fellow dressed in a green lantern outfit with the exact kind of shield i was trying to make. When he was casualy walking around, you couldnt see anything, but as soon as something impacts the shield, a barrier rez's in to stop the bullet. Actually what you are seeing is a TextureAnimation. Psyke Phaeton has a shield that is similar to this. What actually occurs is that the shield is ALWAYS there, but it is set to alpha. When a Collision Event occurs is when the shield appears to ripple. This is actually a very simple thing to do and merely requires the calling of different textures when the on_collision() event occurs. Obviously this does NOT work if the projectiles are not physical unfortunately.
_____________________
Higbee Protagonist ************************ "Even an immobile stone will respond to you If you approach with love, call out, and talk to it." - Shinagawa Tetsuzan
http://www.redprometheus.com
|
Marious Bishop
Registered User
Join date: 11 Mar 2006
Posts: 1
|
07-09-2006 21:26
Actually no its not thers a good chance im the guy he saw and i wear a sion shield it has a sensor system taht rezzes a temp rpim shield when a physical object approaches but does not ahve a large barrier prim i wear .. its a hud attachment and rather nice to wear all the time ... if you activate an inner shield it will res a surronding thin barrier when you are standing for more then 2 secs that rezzes smaller shields .... and my GL ring also rezzes shields that repel physics objects that hit it.
|