News:

Welcome to the new Sinister Design forums!

Main Menu

Ask the developer a question!

Started by CraigStern, February 07, 2010, 11:01:17 AM

Previous topic - Next topic

CraigStern

It's possible now! Make sure you have the latest version of the game, and look up SetStat in the manual. ;)

ArtDrake

ActionScript question. If I want a child object to have access to one or more of the parent's properties, and there's only going to be one instance of the parent object, I could simply make the required properties have the public and static attributes, I think [making them class variables instead of instance variables, if I understand the attributes correctly]. But that really doesn't feel like best practices.

The way I learned, that seems like better coding to me [since it doesn't give rise to weird access issues], is to create a separate property manipulation-request event class [like you call it "InformationEvent" or something, subclass it to Event, etc.] and set up a listener from the parent to the child, such that the setting/getting can be handled with requests [and presumably the source be verified], which would mean that no objects but the specified child would have access to the variables -- good for data security.

My question: do you know / have you run into a technique for this that is superior to either of these? And if not, what do you think about the "bulk vs. security vs. best practices" balancing act, and where on the balance does your code tend to lie?

CraigStern

I have yet to run into a situation where that matters in my own coding. Data security is not super high priority in single player RPGs. :)

Typically, I just pass the variable to the child class on instantiation; if it's something I'll need the parent class to update, then I just make it set a public variable in the child class and have the parent update it as needed.

bugfartboy

What is the liklihood of the lighting character attribute being supported by the SetStat action?

CraigStern

Not super likely--I have a lot of stuff to do, and little time in which to do it. Was there a particular reason you wanted to be able to do that?

bugfartboy

It's not a particularly important reason.  I was just trying to think of ways I could use dialog actions to dynamically create 1-time-appearance characters without cluttering up CharClasses.xml. I was simply wondering if lighting would find its way into the SetStat action, as that would reduce the number of custom sprites I would need by a small degree in some cases.  As I said, not particularly important.

ArtDrake

Is the poetry in TSoG based in any particular culture's literary tradition, with regards to its construction? The obvious guess would be a Middle Eastern one, but I don't want to make assumptions.

CraigStern

Not intentionally--I just kinda wrote poetry that I felt fit with the setting without mimicking any particular tradition (although with that said, I am familiar with certain Middle Eastern poets such as Rumi, so I didn't work entirely blind).

bugfartboy

Do energy golems have two arms, or do they have just the one that their energy cannon is attached to?

CraigStern

They have a second arm, but it's generally kept folded against their backs when not in use.

bugfartboy

So that's what that is. I've always thought that they had a movable shield on their back. That makes Dorgon 5000's melee attack make much more sense.

CraigStern


bugfartboy

#1572
A bit of a follow up: which arm is the energy cannon typically on? A regular energy golem appears to have its cannon on the right, but in Dorgon's portrait it appears to be on the left? (I'm not at a point where I can replay TRPG2 to look at his battle sprite right now.)


Also, would the (very) crude sketch attached be how the spare arm would be tucked away?

CraigStern


CraigStern

Quote from: bugfartboy on February 01, 2015, 06:47:18 PMAlso, would the (very) crude sketch attached be how the spare arm would be tucked away?

Not reaaaaally; the Energy Golem's spare arm is not articulated like that. It's hard to explain. You'd probably need to study Dorgon's walk animation to see what's really going on there.