View Full Version : a new way of gaming instances
orange gold
06-25-2007, 02:10 AM
a new way of gamming instances
1: this is a method "hidden text box instances - actionscript" discovered by albert renshaw full credit goes to him "me"
2: i discovered this a while ago but anyways...
3: here:
instead of doing sumthing so actionsscript recognizes, lets say in a game your poisoned. just make it have a hidden text box off screen and call it player1 instances, then then say if player one hittest with poison snake or what ever, player1 instances = "poisoned3". 3 means 3 turns on the next turn "you could do another box that says off or sumthing when its not their turn then say when that text box says on player 1 instances = "player1 instances - 1" then it would say poisoned2 which means they have 2 turns of poison left" and you can also say if player1 instaces = poisoned 3 then color of player one is green then poisoned 2 is a lighter green and stuff like that then say when player1 instances = poisoned0 then player 1 instances = " " which would not make it recognize the player being poisoned or burned
4: please post if this helped you
5: post any other ways youve used this if it helped you
6: rate my method 1-5 5 being best please
7: please post any errors you find
Umm...If I understand, it sounds like you are using a text field to hold information that could just be stored in an array, or a variable, and use less memory to do so...
Exactly what would the benefit of this be?
say if player one hittest with poison snake or what ever, player1 instances = "poisoned3
if (player1.hitTest(snake)){
var player1Poisoned:Number = 3
}
orange gold
06-26-2007, 02:06 PM
no im not read my paragraph again and youll see
Brucebannor
06-26-2007, 03:33 PM
I agree w/ Noct, seems to be a waste of memory. Unless your Tweening or something a component from off the stage to on. I don't see any benefit that couldn't be done w/ var's or an array.
mattkenefick
06-26-2007, 03:35 PM
use an object
if (player1.hitTest(snake)){
player1.poisoned = 3;
}
orange gold
06-26-2007, 07:26 PM
i find it easier for me:) i made a game only using that here it is...
...
http://albert.teleinc.com/game%20stick%20warz.swf
orange gold
06-27-2007, 05:33 PM
i think its easier for begginers before they get into dol files and var. and stuff
newblack
07-05-2007, 03:21 AM
1: acknowledged- all yours
2: must have been hard keeping this secret!
3: i've read this 11 times now and think i've picked up on over 20 subsets of the english language. you refer to it later as a paragraph- that's insulting to paragraphs everywhere.
4:
5:
6: 1
7: it's a waste of memory
i know i sound kind of harsh, but you sound so full of yourself and have bumped this twice already. in all seriousness you should evaluate what benefit this 'method' has. i assure you what you've deemed is a helpful technique is in fact a fundamental misunderstanding.
whizkid1990
07-06-2007, 02:23 PM
Its better that noobs like me and you(orange gold) listen to the experts here =)
So I will just repeat the other poster's points
1) It's all yours, I don't want it.
2) Sure... well done.... not like anyone cares. The fact that you had to bump this thread 2 times tells us everything we need to know.
3)
4) No it doesn't help. Its a waste of memory, as the info can be stored in as a variable or array. So its completely useless.
5) No way.
6) 1.001
7) no errors. Just a useless method.
you sound so full of yourself and have bumped this twice already. in all seriousness you should evaluate what benefit this 'method' has. i assure you what you've deemed is a helpful technique is in fact a fundamental misunderstanding.
And the creators of flash didn't leave that loophole just for you to discover did they?? It may be a way to do something, but it certainly isn't effective.
orange gold
07-06-2007, 05:17 PM
i am not a noob i was just putting this for the people who dont know var and function
If you don't know how to use variables and functions in ActionScript, you're an amateur. No two ways about it. The fundamental reason for ActionScript to exist is to allow you to effectively script functionality without distributing snippets of code across objects or to have to apply hacks like this.
In short: Doing this is bad programming practice, and if you're new to ActionScript you should learn how to properly use the language rather than take shortcuts because you're too lazy or insecure about your skills to bother learning how to do something properly. This is like telling a novice driver that they shouldn't worry too much about the clutch. Just keep it level with the acceleration pedal, and the car will move. Easy as pie!
evride
07-27-2007, 05:31 AM
hey orange gold made a comeback. o wait. anyone remember that game he wanted us to make for him while making it sound like it was a challenge? I also thought it was funny when you showed a silly example as proof that it is a good way to make game instances. it didn't even work right. and i had no clue what you were saying. didn't make any sense. the vars and arrays are much easier to work with. once you accept that you're a noob I think you will learn much quicker. i know i did. and I'm proud to say i'm still a noob.
i'm sorry for the bump dudes but i just saw this.
ooh i want to do one of those number things
1. check other 1's
2. haha, newblack
3. what the hell?
4. i dont think anyone has or will use it.
5.
6. 0
7. everything
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.