Data Realms Fan Forums
http://45.55.195.193/

Certain things...
http://45.55.195.193/viewtopic.php?f=73&t=16052
Page 1 of 2

Author:  Flammablezombie [ Wed Jul 29, 2009 9:47 am ]
Post subject:  Certain things...

I need a few Lua scripts. I don't know if they're simple or hard.

A chargeup script that makes particles fired sharper.Fix'd.
One that creates a drone similar to the Darkstorm one that follows someone and shoots enemies near them.
One that makes an otherwise harmless particle make an enemy actor alert and start firing at the particle(distractor particle).Fix'd.
A mind-control projectile.Fix'd
A bomb that increases particles in the explosion the longer you hold it, up to the maximum range charge (when the grenade sight reaches 5 dots).Impossible.
New request: A particle that when fired, gives everyone from a list of 5 names a goto command to the wielders position.
A particle that when fired, gives everyone from that same list the command to go on patrol.
A particle that when fired, sets all actors from that list on brainhunt.

Author:  Kyred [ Wed Jul 29, 2009 9:52 am ]
Post subject:  Re: Certain things...

Are you asking for someone to make these scripts, or are you asking if they are difficult to make?

The charge up script is fairly easy to make. Though it get's a little bit tougher if you want to add effects to it.

The following drone is trickier. And I don't know exactly what you mean by using a certain device.

Author:  Flammablezombie [ Wed Jul 29, 2009 9:58 am ]
Post subject:  Re: Certain things...

I'm asking for someone to make the scripts, hopefully with obvious editable bits, because I'm a retard who can't code Lua.
As in, a tool that if fired generates the drone (I can handle this bit), which will then follow you around and fire where you click so long as you're using the device. If you don't use the device, the drone disappears. If you re-equip it, the drone reappears slightly above and behind your head, as in about 5 pixels diagonally up/3 or 4 back. Also, I kinda updated the OP. Sorry.

Author:  Roon3 [ Wed Jul 29, 2009 10:11 am ]
Post subject:  Re: Certain things...

Flammablezombie wrote:
One that makes an otherwise harmless particle make an enemy actor alert and start firing at the particle(distractor particle). - We have these in base.rte go steal Numgun's Darlos's code.
A mind-control projectile. - TLB made this when Build 23 was released.

Author:  Flammablezombie [ Wed Jul 29, 2009 10:12 am ]
Post subject:  Re: Certain things...

Thanks. I will. I owe ya one! You're the only person so far to help me out. Like, at all.

Author:  Geti [ Wed Jul 29, 2009 10:44 am ]
Post subject:  Re: Certain things...

cant check for what someone is holding currently, so its a little impossible.
as such, cant do anything to do with charging up bombs, though the charge up [laser?] thing can be done with global variables. if you want to be able to charge 2 [laser?]s at once, you could store the data as a global table with some positions stored in it, and check for how close you were to the position as for how much you need to charge.
this would be most easily stored as
Code:
{ {pos (vector), charge level}, etc, etc }
and would require some intelligent handling to get working well, but is fully possible.

something on each particle like
Code:
function Create(self)
   self.chargetime = 300 -- time in MS that you want the charge to last for.
   if LASORCHARGE == nil or LASORCHARGE == {} then
      LASORCHARGE = {} -- make a table
   else
      for k,v in ipairs(LASORCHARGE) do
         if (v[1] - self.Pos).Magnitude < 20 then -- if close to a place where something was charged
            v[1] = self.Pos --reset the placing, for movement
            v[2] = v[2] + 1 --add to the charge level
            v[3]:Reset()
            self.isneartarget = true
            self.locality = v
         end
         if v[3]:IsPastSimMS(self.chargetime) then
            table.remove(LASORCHARGE, k)
         else
            v[2] = v[2] * 0.01 --peter off the charge
            if v[2] < 0.1 then
               table.remove(LASORCHARGE, k)
            end
         end
      end
   end
   if not self.isneartarget then
      table.insert(LASORCHARGE, {self.Pos, 0, Timer()}) --make a "place"
   else
      self.Sharpness = self.Sharpness + self.locality[2]
   end
end
should work.
note: completely typed without testing, just use it as a basis.
edit: missed an end
edit2: fixed something.

Author:  Flammablezombie [ Wed Jul 29, 2009 11:52 am ]
Post subject:  Re: Certain things...

Okay, minus the disappear thing. But still, is it possible?

Also, I need a bomb, not a LAZ0R. Thanks though.

Author:  Geti [ Wed Jul 29, 2009 8:36 pm ]
Post subject:  Re: Certain things...

well, that was for the first request.

Author:  Flammablezombie [ Wed Jul 29, 2009 8:55 pm ]
Post subject:  Re: Certain things...

Oh thanks, sorry I forgot.

Author:  Geti [ Wed Jul 29, 2009 10:38 pm ]
Post subject:  Re: Certain things...

you can make an actor follow and fire where an actor is firing quite easily. look at the slave clones mail made. you might want to use kyred's aiming method used in his crazy-levitating-above-head-gun code, to make it more accurate, and do some moraycasting to prevent you from shooting yourself.
of course, all that requires you to know lua.

Author:  Flammablezombie [ Wed Jul 29, 2009 11:09 pm ]
Post subject:  Re: Certain things...

Which I don't. And the slave actors imitate you. I need a drone that will follow you, and remain in the same relative position for as long as it can.

Author:  Areku [ Wed Jul 29, 2009 11:52 pm ]
Post subject:  Re: Certain things...

http://www.datarealms.com/forum/viewtopic.php?f=61&t=15917
This.
It has all that float-above-head stuff, it fires where you fire, and so on. I would help you code it, but I'm really busy with another script right now.

Author:  Flammablezombie [ Fri Jul 31, 2009 10:36 pm ]
Post subject:  Re: Certain things...

Update: It's coming along nicely, but there's a couple that I forgot. Check OP for details, and maybe try if you want a challenge, though this one's fully optional. It would increase the content count of my upcoming mod though.

Author:  411570N3 [ Sat Aug 01, 2009 4:58 am ]
Post subject:  Re: Certain things...

Flammablezombie wrote:
A particle that decreases damage the further away it gets.
AirResistance is your friend.

Author:  Flammablezombie [ Sat Aug 01, 2009 11:24 am ]
Post subject:  Re: Certain things...

Cheers. Increase it then?

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/