View unanswered posts | View active topics It is currently Thu Jan 09, 2025 12:23 pm



Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
 Need help with changing sprites when hit. 
Author Message
User avatar

Joined: Sat Jul 04, 2009 9:30 pm
Posts: 55
Location: Bangkok, Thailand
Reply with quote
Post Re: Need help with changing sprites when hit.
Mind wrote:

Now open Notepad++ and save that file as "Actor.lua" in your rte

Go to the actor's code and go down to where he is defined.

Hope this helps :)


So now if I want his head's sprite to change, I should go down to where his head is attached, add the code to attach the lua script, make another copy of his head's sprites, edit the color, and then name it "headA0002" correct? What I don't understand is, how does Lua know which sprite in my rte to change?! Or is that why they call it Sparkle Magic?


Tue Sep 08, 2009 11:34 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Need help with changing sprites when hit.
If you make an object with, say, two frames, you do two things to tell the game that: define the filepath as <whatever.rte>/yourfile.bmp. Then, you set FrameCount to 2. That tells the game to try and load two frames.

Then, in Lua, you simply load the object, and by default tell it to be Frame = 0, and if a special set of conditions happen, Frame = 1. No magic, just science.

Also, running a script on the head is going to be significantly more complex because by default Lua doesn't run on attachables (heads, limbs, jetpacks, guns while held)


Tue Sep 08, 2009 2:43 pm
Profile
User avatar

Joined: Sat Jul 04, 2009 9:30 pm
Posts: 55
Location: Bangkok, Thailand
Reply with quote
Post Re: Need help with changing sprites when hit.
K... so "FrameCount = 2" in the .ini under where the head is attached and name the second frame [What?] and then attach the Lua file at the bottom of the document and then that should work? Sorry 'bout the flood of questions. I just want to make a mod that would work well. (This is not my first mod though.)


Tue Sep 08, 2009 3:19 pm
Profile
User avatar

Joined: Sat Jul 04, 2009 9:30 pm
Posts: 55
Location: Bangkok, Thailand
Reply with quote
Post NOTICE. WIP set for release
To everyone that might still be reading this topic! I am pleased to announce that the BioShock mod's WIP is set for release by tomorrow! So far it only has an unfinished Rosie that comes default with a Rivet Gun. The sprites might need tweaking, but I'm not dropping this mod anytime soon. I'm posting it just to have some progress. Should I make a new topic then?I can't wait :-o

EDIT! SORRY GUYS. I went back and looked through it, and then noticed that it wasn't good enough for release. Sorry again. Just wait k? Thanks


Wed Sep 23, 2009 3:10 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 19 posts ]  Go to page Previous  1, 2

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.062s | 13 Queries | GZIP : Off ]