View unanswered posts | View active topics It is currently Fri Jan 10, 2025 12:09 am



Reply to topic  [ 6 posts ] 
 Shields 
Author Message
User avatar

Joined: Thu Apr 30, 2009 10:54 pm
Posts: 36
Reply with quote
Post Shields
So, anyone of you who has read Dune, by Frank Herbert, will account for the awesomeness of the shield technology employed by the characters in his books. For those of you not familiar with them, Dune's shields only allow things in that go below a certain speed and, because of that, combat in Dune takes very subtle technique to master. My question is: with the new features available in Build 23 or, the current build, would there be a possible way to create a shield that allows things to enter that go below a certain velocity? This kind of shield would most ideally be used to block a long range assault on your brain from a distant assailant.


Sun May 10, 2009 7:37 pm
Profile
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: Shields
Yes, the principle is easy. I'd say max 10 lines. Unless you want it to be a helddevice which doesn't work in B22 at least. Dunno about 23.


Sun May 10, 2009 7:51 pm
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Shields
Dune is great, just finished reading it.
The shield idea is nice, but I think its only possible with Lua. (This is the part where some awesome dude (Grif, Zalo...) comes along and proves me wrong)
I have made something close, but its very laggy and does the opposite, it allows fast moving things to go through and stops the slow ones. (its also doesn't work on MOPixels and MOSPs)

Edit: got ninja'd... whatever.


Sun May 10, 2009 7:54 pm
Profile WWW
User avatar

Joined: Thu Apr 30, 2009 10:54 pm
Posts: 36
Reply with quote
Post Re: Shields
Would you mind (Piipu that is) making a device like that to attach to a brain?


Sun May 10, 2009 7:56 pm
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Shields
Its very simple, if I had the time I'd do it now. (So you can attach it to a brain when Build 23 comes out)
It would work in a special scene now though.


Sun May 10, 2009 7:57 pm
Profile WWW
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: Shields
Easiest way of doing it is making the brain actor itself do the shield stuff. But here's the code for B22:
Code:
for actor in MovableMan.Actors do
  if actor.PresetName == "Brain Case" then
    for particle in MovableMan.Particles do
      dist = math.sqrt( (actor.Pos.X-particle-Pos.X) ^ 2 + (actor.Pos.Y - particle.Pos.Y) ^ 2)
      totalvel = math.sqrt(particle.Vel.X ^ 2 + particle.Vel.Y ^ 2)
      if dist < 100 and totalvel > 50 then
        particle.Vel = Vector(0,0)
      end
     end
  end
end

Oops, sorry it's 11 lines :P
Edit: Copypaste to the beginning of any luaed scene to make the standard brain case have the shield. Change the actor.PresetName == "Brain Case" to actor.PresetName == "Brain Robot" to make it work with the brain bot.


Sun May 10, 2009 8:30 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.037s | 14 Queries | GZIP : Off ]