Recent posts by DaFlamingPotato on Kongregate

Flag Post

Topic: Game Programming / [AS2] Equipping items

Oh, okay. I was unaware of that. Thanks.

 
Flag Post

Topic: Game Programming / [AS2] Attaching items

Thanks for the help, NineFiveThree. The typo was the main issue.

 
Flag Post

Topic: Game Programming / [AS2] Equipping items

So when I do the for loop I’m writing code inside of the movieclip?

 
Flag Post

Topic: Game Programming / [AS2] Attaching items

Okay, so I’m wondering how to make this work…


//items the player has are pushed into this array
var itemsWaiting:Array = [];

//push items the player has into this array...
itemsWaiting.push("basicSword","basicStaff","basicDagger","basicHelmet","basicPlate","basicPants","basicBoots","basicApprenticeHat","basicApprenticeRobes","basicRogueHood","basicRogueCloak","basicRogueArmor","health3","mana3","stamina3","lockpick","key");

//...and then when they are attached to the screen push them into this array
var itemsinBackpack:Array = [];

for (b = 0; b < itemsWaiting.length; b++)
{
	attachMovie(itemsWaiting[b], itemsWaiting[b], this.getNextHighestDepth(), {_x:openSlots[0]._x, _y:openSlots[0]._y});
	itemsInBackpack.push(itemsWaiting[b])
	openSlots[0] = itemsWaiting[b].slot
	openSlots.splice(0,1)

I want to attach all of my items to the screen.
I have the itemsWaiting array to store the names that my items will have.
But then how do I push the item I just attached to the itemsInBackpack array?
Tracing itemsInBackpack with this gives me undefined.

 
Flag Post

Topic: Game Programming / [AS2] Equipping items

Ok, I’ve solved the problem but I don’t understand how.
I replaced every instance of “this” in the code with “clickedItem”, a new var I made which equals “this”.
Why can’t I just use “this”? :S

 
Flag Post

Topic: Game Programming / [AS2] Equipping items

Okay, so I’m having some issues in my RPG.
The player has a backpack, and any items they pick up are placed in there (and pushed into the itemsInBackpack array).
I’m trying to get it so that when you double-click an item in the backpack it will either become equipped or unequipped. To do this the item has to move to a certain slot.
However when I try to accomplish that by using this code, it moves the entire stage instead of just the item.

stop();

//declares a boolean stating if an item is equipped
var itemEquipped:Boolean;

//items the player has are pushed into this array
var itemsInBackpack:Array = [];

//push items the player has into the array
itemsInBackpack.push(basicSword,basicStaff,basicDagger,basicHelmet,basicPlate,basicPants,basicBoots,basicApprenticeHat,basicApprenticeRobes,basicRogueHood,basicRogueCloak,basicRogueArmor,health3,mana3,stamina3,lockpick,key);
 
//opens slots in the backpack
var openSlots:Array = [slot10,slot11,slot12];

//opens slots for equipping items in backpack
var openEquipSlots:Array = [slot1,slot7,slot8];

//create a string for the slot's number
var slotNumber:String

//create a boolean to check if a slot is one for equipped items
var equippedItemSlot:Boolean = false







//for any items in backpack
for (b = 0; b < itemsInBackpack.length; b++)
{
	itemsInBackpack[b].onRelease = function()
	{
		if (lastclick - (lastclick = getTimer()) + 200 > 0)
		{
		//Double clicks will check if you can equip the item.
		equippedItemCheck(this);
		}
		else
		{
		//if it's a single click just show the description.
		_root.itemDescriptions.gotoAndStop(this._name);
		}
	}
}

function equippedItemCheck()
{
	if (this.itemEquipped == false)
	{
		this.itemEquipped = true;
		equipItem(this)
	}
	else
	{
		this.itemEquipped = false;
		findOpenSlot(this)
	}
}

function findOpenSlot()
{
	this._x = openSlots[0]._x
	this._y = openSlots[0]._y
	openSlots[0].splice()
}

function equipItem()
{
	this._x = openEquipSlots[0]._x
	this._y = openEquipSlots[0]._y
	openEquipSlots[0].splice()
}

I substituted “basicStaff” for “this” in the equip/unequip item function and it worked fine.
Can anybody help me out here? It’s killing me…
I’ll provide more details if necessary.

 
Flag Post

Topic: Game Design / this is pretty damn cool

This does look cool, thanks for sharing.

 
Flag Post

Topic: Game Design / Ninja Sequence

Awesome job! This game looks great. :D

 
Flag Post

Topic: Forum Games / [Roll Playing]The imaginary game

Austin – human
________________

Characteristics:

Tall and big body, kind of strong. Slightly chubby, not very fast.
Dark brown hair, either extremely long or extremely short.
Dark brown eyes. Prefers simple, mono-colored or striped clothing. ALWAYS wears sandals.
Very smart, always thinks before acting. Generally a quiet person that keeps to himself.
Especially good at math. Occasionally lonely and likes being around people. PC gamer.

 
Flag Post

Topic: Kongregate / Your favorite game on Kongregate

GDR

Starland TD

There are many more but I can’t think of them off the top of my head.

 
Flag Post

Topic: Game Design / Animating characters

Well, you can use either or really. I usually animate using multiple layers in the timeline and creating a separate group/symbol for each body part. Also, I believe you’re in the right place.

 
Flag Post

Topic: Game Programming / Bot Battle [#1] : Tron

I’d enter if I was more experienced. :(

 
Flag Post

Topic: Game Design / Welcome to the Game Design Forum!

Awesomeness.

I am also the fo shizzle.

:D

 
Flag Post

Topic: Game Programming / What are you working on right now?

I’m working on my first AS3 game.

 
Flag Post

Topic: Stencyl / Post Your Finished Stencyl Games

http://www.kongregate.com/games/DaFlamingPotato/knils-flash-adventure

Not exactly finished. A short little game, a few bugs, terrible hitTest. XD

Anyway, enjoy.

 
Flag Post

Topic: Stencyl / My opinion on Stencyl + game

Hello everyone.

I think Stencyl is a great tool for beginners. Possibly for experienced programmers as well. Over the past week or two, I developed this game. (Short game. I got bored with it.)

http://www.kongregate.com/games/DaFlamingPotato/knils-flash-adventure

It was relatively easy, although Stencyl still has some kinks that need worked out. Some minor problems can crash the whole thing, and things with seemingly simple solutions might end up taking hours to fix.

I still recommend Stencyl to beginners. The code block editing is great for learning basic stuff. And make sure you take a look at the preview code box to see what’s really going on.

It’s a pretty powerful tool, but you can only go so far. The rest you have to do yourself, or your game will suck. (Like mine)

Many users get a negative impression of Stencyl because of the masses of bad games uploaded through it. These are mostly slightly altered crash-course games uploaded by new developers. There are quite a few good Stencyl games if you look around.

And what I don’t understand is how Stencyl is supported by Kongregate, yet things like GameMaker are shunned upon. How are they much different?

(This thread is for friendly discussion about my game, pros/cons of Stencyl, and Stencyl VS GameMaker/Flash. Please keep swearing/flaming to a minimum.)

 
Flag Post

Topic: Stencyl / Stencyl is a failure.

I do not think Stencyl is a failure. I think it’s great for beginners.

I can’t wait for someone to make a really good game in Stencyl, so people can see its potential.

 
Flag Post

Topic: Game Programming / Game Development Room (GDR)

the new code box is awesome!

 
Flag Post

Topic: Collaborations / Looking for somebody to help me out with story lines and ideas!

Hello SeerOfShadow.

I’m currently taking a break from game making, but I am looking to expand my artistic abilities. If you let me know what you’re looking for, I might be able to help.

 
Flag Post

Topic: Game Programming / Game Logos

Save as a png.

JPG severely cuts the quality.

 
Flag Post

Topic: Game Programming / Starting with AS3

Thanks for the advice Gester, I’ll keep that in mind!
You’ll be seeing some basic as3 games from me shortly. :)

 
Flag Post

Topic: Game Programming / Starting with AS3

Ah, thanks :P XD
I could not find the edit post button earlier, but now I see it. Thanks again.

 
Flag Post

Topic: Game Programming / Starting with AS3

oops meant to do bold .

 
Flag Post

Topic: Game Programming / Starting with AS3

Hi.

I have been messing with Flash and ActionScript since mid 2009 on and off. I usually only spend time on it during the summer. I started with AS2 and made some crappy games. Then I realized I’ve been doing this totally wrong. I really haven’t learned how to use AS properly, so I decided to start fresh with AS3.
Today I started with these tutorials:

http://gamedev.michaeljameswilliams.com/2008/09/17/avoider-game-tutorial-1/

and I am looking for other helpful resources. I’m trying to focus on correct format so that I don’t get to the same point in AS2 where everything was all messy and I never got anything done.

Currently, my learning style is this:
-follow the tutorials and type in the code myself
-practice and get used to each new term

Do you guys have any resources or tips you’d like to give? I want to start using flash more often and get better at the language. I also want to explore more of the features of Flash and the graphical side.

Also, on MJW’s tutorial, for some reason I cannot get the Enemy to go to where I want it to.

package 
{
	import flash.display.MovieClip;

	public class Enemy extends MovieClip
	{
		<b>public function Ememy()
		{
			x = 300;
			y = -20;
		}</b>

		public function eDown():void
		{
			y = y + 2;
		}
	}
}

That is what I have for the Enemy class. Everything works except the enemy still appears at 0,0. Help? :(

 
Flag Post

Topic: Game Programming / [AS2] Jeopardy

oh nvrm .
thanks for your help