Data Realms Fan Forums http://45.55.195.193/ |
|
Some questions regarding an upcoming mod. http://45.55.195.193/viewtopic.php?f=73&t=18615 |
Page 1 of 2 |
Author: | carriontrooper [ Tue Apr 27, 2010 12:08 pm ] |
Post subject: | 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.? |
Author: | matty406 [ Tue Apr 27, 2010 4:46 pm ] |
Post subject: | 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. |
Author: | CaveCricket48 [ Tue Apr 27, 2010 7:40 pm ] |
Post subject: | 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. |
Author: | carriontrooper [ Wed Apr 28, 2010 4:13 am ] |
Post subject: | 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? |
Author: | CaveCricket48 [ Wed Apr 28, 2010 11:41 am ] |
Post subject: | 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. |
Author: | carriontrooper [ Wed Apr 28, 2010 2:05 pm ] |
Post subject: | 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. |
Author: | carriontrooper [ Fri Apr 30, 2010 4:19 am ] |
Post subject: | 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. |
Author: | CaveCricket48 [ Sat May 01, 2010 5:00 pm ] |
Post subject: | 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. |
Author: | carriontrooper [ Sun May 02, 2010 8:16 am ] |
Post subject: | 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. |
Author: | carriontrooper [ Tue May 11, 2010 6:53 am ] | ||
Post subject: | 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.
|
Author: | CaveCricket48 [ Wed May 12, 2010 10:41 pm ] |
Post subject: | Re: Some questions regarding an upcoming mod. |
You have breaks where they are not needed. You only use breaks to end a "for" statement. |
Author: | carriontrooper [ Thu May 13, 2010 5:07 am ] |
Post subject: | Re: Some questions regarding an upcoming mod. |
OK, thanks. I'll ry it, and let's hope this works now. |
Author: | carriontrooper [ Thu May 13, 2010 11:36 am ] |
Post subject: | 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... |
Author: | Duh102 [ Thu May 13, 2010 2:33 pm ] |
Post subject: | Re: Some questions regarding an upcoming mod. |
Open up the console with ~ and see if there's any errors there. |
Author: | carriontrooper [ Sat May 15, 2010 5:44 am ] |
Post subject: | Re: Some questions regarding an upcoming mod. |
There's nothing on the console that indicates anything's wrong with Cordyc.rte. It just duds. |
Page 1 of 2 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |