Qualifiers?

Get help using Construct 2

Post » Mon Dec 26, 2011 2:10 am

I remember in MMF2 there was a way of setting a qualifier to various objects. This would be useful if you wanted to do specific things with certain items, but not others.

For example, if you have various weapon types, and various weapons for that type, you could say "Qualifier Knife" or "Qualifier Unarmed" "Qualifier Sword" etc.

This way, the knife changes depending on what you have, but since the character animations are all the same for each knife you get (the knives can be various looks and colors), it would be easier to say "qualifier knife equipped" then "set animation of qualifier knife to animation of char".

I hope this was explained easily enough, and I appreciate any thoughts on this topic. If I've missed this somewhere, please tell me!

Thanks!
Roryroracle2011-12-26 02:11:02
B
24
S
6
G
6
Posts: 255
Reputation: 3,649

Post » Mon Dec 26, 2011 2:53 am

You can go with instance variables (IV) and the animations feature of the sprite object.

Make an IV "Type" (text) and one "State" (text).
Then be sure to name your different animations according to Type_State (ex: knife_drawn; deserteagle_reload; etc...)

Then in your conditions you can check for the values of the IV you want.
And to set the animation :
Sprite_Set animation to: Sprite.Type & "_" & Sprite.State

This is basicly the same logic you described.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Mon Dec 26, 2011 3:27 am

Yeah I was poking around with what I was already doing and noticed that as a valid option (and possibly the best, but I second guess myself). Thank you for your input, makes this decision easier.
B
24
S
6
G
6
Posts: 255
Reputation: 3,649

Post » Mon Dec 26, 2011 10:54 am

I'm also an old mmf2 user and qualifiers are just a badly implemented version of what we call families in construct (I heard they will improve it for mmf3...).
You already have them in construct classic, but it's not there yet for construct 2. Ashley is well aware of our expectations about families and I heard he is or will be working on it soon (:Yann2011-12-26 10:54:59
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Dec 27, 2011 5:58 am

That's very good to know. I'll design my game around the concept because it seems very nice in many cases that aren't what I was asking about here, and I know they'll come in handy.
B
24
S
6
G
6
Posts: 255
Reputation: 3,649

Post » Tue Dec 27, 2011 7:58 am

well, be carefull, nobody know how much time it will take to have this feature. It's really not easty to implement (when I think about it).
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue Dec 27, 2011 4:13 pm

Well I'm sure there are other ways of doing it. I usually wake up from my sleep hours earlier because my subconscious tells me how to do things. (or god or whatever you wanna call it). Luckily I know a few ways that will work just fine with what I had in mind.

I'll just make a magenta colored version of a knife, blade, longsword, gun etc, then go to the sprites and draw the animations while making it "always set to image point X" and "always set animation to Player.AnimatinonName" along with "always set frame to Player.AnimationFrame"

I'm going to have to make a new item for each one being used, but luckily I'm doing a Castlevania style game play, so shield and sword will only be used in combat (and when idle if it's the last weapon you used).

And since I'm on the topic, is there any way of open sourcing this when I'm done so everyone can have a nice starting point to work with? I want to share this with others for rapid platform game development, but I don't know if my programming skills are good enough to ensure the fastest development experience. It's just a platform engine a la Castlevania (as I said) and not every animation is used, but can be implemented.

For example, I have many event sheets (five so far) for all his actions and animations, that way to keep organized without going crazy, but should I eventually put them all in one sheet and put them in groups to save on any headaches?

Sorry to sway so off topic there.
B
24
S
6
G
6
Posts: 255
Reputation: 3,649

Post » Tue Dec 27, 2011 4:51 pm

For open sourcing, simply share the final capx.
Users will then implement/use it as they like.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, abdalghani, imothep85, Marxally, Virpoja and 26 guests