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



Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
 Some questions regarding an upcoming mod. 
Author Message
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Some questions regarding an upcoming mod.
Okay, so I wanted to make an infectious faction which is fungi-based and you guys may have heard of it.
So, some stuff which needs sparkle magic but I don't know how to make:

1) a gun which hurts enemy actors, and turn them into fungal abominations (on our side) when their health is below a certain point. I figures this is something like the FO3 Plasma Rifle, but has a wider scope (the FO3 script uses brute string recognition force when skeletonizing, due to the difference of what could be skeletonified; my faction only differs between AHumans or ACrabs) and churns out a live, fungal puppet in our team instead of a skeleton.

2) said fungal puppet could 'grow' into a different kind of fungal puppet at the cost of some gold. The trigger could be pie menu -> gold dig AI mode. I think this is by far the most confusing one, involving something akin to Darkstorm Shishi building thing (shows transformation via inert frames). I looked at the code but I couldn't figure out heads or tails out of it.

Well I think that's about it, can someone point out what script to use, what techniques to utilize, etc.?


Tue Apr 27, 2010 12:08 pm
Profile YIM WWW
User avatar

Joined: Tue Oct 13, 2009 4:23 pm
Posts: 915
Location: Blighty
Reply with quote
Post Re: Some questions regarding an upcoming mod.
I would like to see this. It'd be great if you could have some sort of parasitic fungi that eventually takes over the map.


Tue Apr 27, 2010 4:46 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Some questions regarding an upcoming mod.
There's a Lua tutorial stickied in this subforum. Techniques you can use to "replace" actors is to delete the actor that was hit and spawn the fungal actor in the same position. Both of the things you need are fairly easy to script, so you should give it a try yourself and post back what you got.


Tue Apr 27, 2010 7:40 pm
Profile
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: Some questions regarding an upcoming mod.
CC48: Well, I would rather gib the offending actor, but I'll see if I could make the first one. I am still confused about how to deploy the sprite animation for the second... and also, can one flip the HFlip of a whole string of sprites?


Wed Apr 28, 2010 4:13 am
Profile YIM WWW
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Some questions regarding an upcoming mod.
If your animated particle is an MOSRotating, then yes. I would deploy the MOSRotating after the target is gibbed, and then activate the main Lua once the MOSRotating gets to Frame X.


Wed Apr 28, 2010 11:41 am
Profile
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: Some questions regarding an upcoming mod.
Well, you seem to get some stuff wrong, I mean the first article is to spawn one of ours from the exploding gibs of an emeny actor, and the second article is to upgrade the fungi warrior into another, more deadly fungi warrior. Thanks for the tips though, I'll see if I can write an initial script and post it here for you guys to fix.


Wed Apr 28, 2010 2:05 pm
Profile YIM WWW
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: Some questions regarding an upcoming mod.
OK, here's a broken script for the actor spawning thingy, tell me what I did wrong and how to fix it.

Code:
function Create(self)

   self.FoundTarget = false;
   self.Target = nil;
   self.Spawned = false;
   self.HurtTarget = false;
   self.Teamset = nil;
   self.Teammate = nil;
   local curdist = 35;

   for actor in MovableMan.Actors do
      local avgx = actor.Pos.X - self.Pos.X;
      local avgy = actor.Pos.Y - self.Pos.Y;
      local dist = math.sqrt(avgx ^ 2 + avgy ^ 2);

      if dist < curdist then

      curdist = dist;
      self.Teammate = actor;
      self.Teamset = actor.Team;
   end

end

function Update(self)

   if self.FoundTarget == true then
      if self.Spawned == false then
         if self.Target.Health < 20 then
            if self.Target.ClassName == "AHuman" then
            self.Target:GibThis();
            --self.SpawnA = CreateAHuman("humanoid");
            self.SpawnA = CreateAHuman("Dummy");
            self.SpawnA.Pos = self.Target.Pos;
            self.SpawnA.Team = self.Teamset;
            self.SpawnA.Health = 100;
            self.SpawnA.RotAngle = self.Target.RotAngle;

            if self.Target.HFlipped == true then
               self.SpawnA.HFlipped = true
               MovableMan:AddActor(self.SpawnA);
               self.Spawned = true;
               break;
            else
               MovableMan:AddActor(self.SpawnA);
               self.Spawned = true;
               break;
            end

            else

            if self.Target.ClassName == "ACrab" then
            self.Target:GibThis();
            --self.SpawnB = CreateACrab("craboid");
            self.SpawnB = CreateACrab("Dreadnought");
            self.SpawnB.Pos = self.Target.Pos;
            self.SpawnB.Team = self.Teamset;
            self.SpawnB.Health = 100;
            self.SpawnB.RotAngle = self.Target.RotAngle;

            if self.Target.HFlipped == true then
               self.Spawn.HFlipped = true
               MovableMan:AddActor(self.SpawnB);
               self.Spawned = true;
               break;
            else
               MovableMan:AddActor(self.SpawnB);
               self.Spawned = true;
               break;
            end

            else
            self.Target:GibThis();
            end
         end
      else
         if self.HurtTarget == false then
            self.Target.Health = self.Target.Health - 10;
            self.HurtTarget = true;
         end
      end
   else

   local curdist = 35;

   for actor in MovableMan.Actors do
      local avgx = actor.Pos.X - self.Pos.X;
      local avgy = actor.Pos.Y - self.Pos.Y;
      local dist = math.sqrt(avgx ^ 2 + avgy ^ 2);

      if dist < curdist then

      curdist = dist;
      self.Target = actor;
      self.FoundTarget = true;

      end

   end

   end
end


For the record, this is based off the FO3 Plasma Rifle's script, and attached to a particle which gibbed from the round a gun is firing. So the .ini similar to the SET electro rifle.


Fri Apr 30, 2010 4:19 am
Profile YIM WWW
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Some questions regarding an upcoming mod.
You'er missing 2 "end"s. The first one is in the Create() function, and need to close "if dist < curdist then". I'm still trying to find the location for the second end, should go somewhere in the Update() function.


Sat May 01, 2010 5:00 pm
Profile
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: Some questions regarding an upcoming mod.
CaveCricket48 wrote:
You'er missing 2 "end"s. The first one is in the Create() function, and need to close "if dist < curdist then". I'm still trying to find the location for the second end, should go somewhere in the Update() function.


Thanks. I'll try adding and see if it works.


Sun May 02, 2010 8:16 am
Profile YIM WWW
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: Some questions regarding an upcoming mod.
FTHAGN. I tried and it didn't work. I don't know what's wrong. Here, have a gander at the .rte.


Attachments:
File comment: The one with the problem.
Cordyc.rte.rar [383.47 KiB]
Downloaded 184 times
Tue May 11, 2010 6:53 am
Profile YIM WWW
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Some questions regarding an upcoming mod.
You have breaks where they are not needed. You only use breaks to end a "for" statement.


Wed May 12, 2010 10:41 pm
Profile
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: Some questions regarding an upcoming mod.
OK, thanks. I'll ry it, and let's hope this works now.


Thu May 13, 2010 5:07 am
Profile YIM WWW
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: Some questions regarding an upcoming mod.
Dammit, it won't work. I know it must be the Lua since the .rte loads gracefully. What the heck is wrong with my script?!? Any of the Lua-experienced, help me on this one...


Thu May 13, 2010 11:36 am
Profile YIM WWW
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Some questions regarding an upcoming mod.
Open up the console with ~ and see if there's any errors there.


Thu May 13, 2010 2:33 pm
Profile
User avatar

Joined: Mon Apr 13, 2009 12:27 pm
Posts: 813
Location: Yogyakarta, Indonesia. A slice o' paradise.
Reply with quote
Post Re: Some questions regarding an upcoming mod.
There's nothing on the console that indicates anything's wrong with Cordyc.rte. It just duds.


Sat May 15, 2010 5:44 am
Profile YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 25 posts ]  Go to page 1, 2  Next

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.063s | 17 Queries | GZIP : Off ]