Charas-Project

Game Creation => Requests => Tutorials => Topic started by: Vlad Shadeu on August 19, 2009, 05:45:52 PM

Title: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: Vlad Shadeu on August 19, 2009, 05:45:52 PM
I get global variables, but how are they supposed to look and what can make them go wrong?
I always seem to declare object-based variables backwards. It's obj.var, right?
How to strings and string based variables work? how could i set up a global string?
Title: Re: Couple more GM questions
Post by: fruckert on August 19, 2009, 07:35:09 PM
Global variables just have a global. prefix attached to them, and I'm not sure what you mean by "how can they go wrong?". You can go out of your way to make them fail, but I don't know
It is obj.var, that is completely correct.

Strings are basically sentence variables. I personally use them to change a message on the fly (hit space, show message, change variable to something else so next time you hit it, it says something else), but you can use them for a lot of stuff.
Like, say, execute_string(), in which you can do some complex math stuff I don't really want to think up right now.
Title: Re: Couple more GM questions
Post by: Vlad Shadeu on August 19, 2009, 08:30:42 PM
what is the scripting difference between a number variable and a string variable/
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: Vlad Shadeu on August 19, 2009, 08:41:03 PM
Appendum: How are masks supposed to be used and how do i set something up to keep drawing the different sprites that are necessary while still keeping the mask in place?

EDIT: Also, find any modern clothing?
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: fruckert on August 19, 2009, 09:42:23 PM
A string can technically be anything, just as long as it is enclosed between some commas.
You would use a string to name armor pieces, have mouseover menus, and things, where the reals (a number variable) would be used for the stats and the like.

A mask is a bit more complicated.
You use a mask when you want the collisions in an object to not match up to the sprite itself.
Most often they're big green squares used in platforming engines, so that anything within a distance of a character hits him.
It can also be used for animations, because sometimes animations in GM will extend their collision only to that specific frame.
So we'd use a mask, say, an explosion, so that the collisions don't go all funky.
I'll try to whip up a sample GMK and send you it, cause I know my explanations have a tendency to suck ***.
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: Vlad Shadeu on August 19, 2009, 10:11:17 PM
http://www.mediafire.com/?j24wtjx0mm2

that is the working copy of the moveabout engine in TacTiles.
Basically i'm just making bits and pieces which i will merge on completion, really helps in situations like this when you need just a little something to work on. Also, it so happens this will be on my new Drag And Drop Expert set (thus the "Smooth Move" title)

also, can you figure out whats gone wack with the coding for the arrows? i'm trying to get it so i dont need a new object for each room transition, but its not working so well since the formula to calculate the appearance appears to be off. The black spaces stay the same so the distance formulas shouldn't change. dont know how to do the room thing yet.
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: fruckert on August 19, 2009, 10:27:57 PM
I'll go ahead and try, but don't expect an answer back for a couple of days, because I've been having massive attacks of insomnia, and I've been trying to fix that.
Also, I just coded a terrific, if a bit more limited movement engine, and I'm more than positive I can port the transitioning blocks from Kyoob into an RPG format, so I'll try to throw that together, and send it over to you.
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: Vlad Shadeu on August 19, 2009, 11:25:41 PM
How limited? I liked the Smooth Move system.
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: fruckert on August 19, 2009, 11:33:27 PM
It's attached to a grid, so then movement is restricted like it is in 2k3.
It's a lot easier to set up collisions then in a pixel based movement system, and has a very smooth sensation to it.
Problem would be that it's a lot harder to animate, and movement feels, well, griddy.
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: Vlad Shadeu on August 19, 2009, 11:51:51 PM
Wait, harder to animate? will i be able to do character customization on this? i need to for the character himself, and also for the random NPC generator.
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: fruckert on August 20, 2009, 12:01:25 AM
Of course you can, it's just getting the animation to stop just where you want it to.
I'll go send it to you after I merge them together.
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: Vlad Shadeu on August 20, 2009, 12:05:02 AM
Do you have a facebook? it would be a far more efficient way for us to discuss the wonderful things you do for this project you aren't helping me with.
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: fruckert on August 20, 2009, 12:15:05 AM
I got banned from Facebook for no reason >>
I do have an MSN though, go onto me profile for the email.
Title: Re: Couple more GM questions, and then a few more (thanks in advance fruckert!)
Post by: Vlad Shadeu on August 20, 2009, 12:15:50 AM
Actually i'm using someone elses computer, i'll look into getting it though.

EDIT: Nope, sorry.