Hi,
I have a set of integers (0 to 9) which I need to be produced in a random order (all 10 numbers in the set need to be generated but only appear once). I tried using irandom(9) 10 times consecutively, but that did not ensure that all numbers appeared. Any ideas on how to do this? (Preferably in the Lite version of Gamemaker).
Thanks
rude guss
- Game Maker Community
- → Viewing Profile: Topics: rude guss
rude guss
Member Since 16 Jun 2006Offline Last Active Apr 17 2013 01:15 PM
Community Stats
- Group GMC Member
- Active Posts 235
- Profile Views 2877
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
12
Doing something right!
Topics I've Started
How to generate a set of numbers in a random order
07 January 2013 - 02:13 AM
Image_alpha (gm7 Unreg) [new Problem]
17 February 2010 - 06:42 AM
mmmmm... does image_alpha not work on sprites drawn with draw_sprite()??
heres my code
"Draw EVENT"
if direction > 247 && direction < 292 {image_alpha = 0; draw_sprite(state_anim[state,0],-1,x,y);}
if direction > 292 && direction < 332 {image_alpha = 0; draw_sprite(state_anim[state,1],-1,x,y);}
if (direction > 332 && direction < 360) or (direction > 0 && direction < 22) {image_alpha = 0; draw_sprite(state_anim[state,2],-1,x,y);}
if direction > 22 && direction < 67 {image_alpha = 0; draw_sprite(state_anim[state,3],-1,x,y);}
if direction > 67 && direction < 112 {image_alpha = 0; draw_sprite(state_anim[state,4],-1,x,y);}
if direction > 112 && direction < 157 {image_alpha = 0; draw_sprite(state_anim[state,5],-1,x,y);}
if direction > 157 && direction < 202 {image_alpha = 0; draw_sprite(state_anim[state,6],-1,x,y);}
if direction > 202 && direction < 247 {image_alpha = 0; draw_sprite(state_anim[state,7],-1,x,y);}
Problem: they are still fully visible when i run the game. what am i doing wrong??
heres my code
"Draw EVENT"
if direction > 247 && direction < 292 {image_alpha = 0; draw_sprite(state_anim[state,0],-1,x,y);}
if direction > 292 && direction < 332 {image_alpha = 0; draw_sprite(state_anim[state,1],-1,x,y);}
if (direction > 332 && direction < 360) or (direction > 0 && direction < 22) {image_alpha = 0; draw_sprite(state_anim[state,2],-1,x,y);}
if direction > 22 && direction < 67 {image_alpha = 0; draw_sprite(state_anim[state,3],-1,x,y);}
if direction > 67 && direction < 112 {image_alpha = 0; draw_sprite(state_anim[state,4],-1,x,y);}
if direction > 112 && direction < 157 {image_alpha = 0; draw_sprite(state_anim[state,5],-1,x,y);}
if direction > 157 && direction < 202 {image_alpha = 0; draw_sprite(state_anim[state,6],-1,x,y);}
if direction > 202 && direction < 247 {image_alpha = 0; draw_sprite(state_anim[state,7],-1,x,y);}
Problem: they are still fully visible when i run the game. what am i doing wrong??
Too Many Variables?
18 January 2010 - 12:57 AM
im making an rts game and at the moment each object in the room has about 200 variables and im planning to have about 200 to 500 of those objects in the room at one time. 500 * 200 = 100000. is 100000 variabes too many?? or is it linked to the amount of ram your computer has??
Awesome 2d Rts Engine (similar To Warcraft/strcft)
03 March 2009 - 02:23 AM
Have you ever played starcraft or warcraft, and thought - i wish i could make something like this -- well now you can!! the awesome 2d rts engine is: an awesome 2d rts engine that works just like starcraft and warcraft. simply plug in your graphics, modify the stats of your units and building, design spells and create your map. Then you have your own awesome 2d rts.
GM Version: Gamemaker 7/8 Unregistered! (GM8 Pro required for Multiplayer version)
Download: https://www.box.com/...ncolurxhqd3pnwo ( [GM8] v0015.0 Unregistered Version )
Download: https://www.box.com/...elwh6kx9005xujg ( [GM8Pro] v0017.5 Multiplayer Version - Uses Faucet Network Extension 1.4.2)
Faucet Network Extension: http://gmc.yoyogames...howtopic=498062
How-To Guide: https://www.box.com/...9kzbntbqtsxlvwv (v1.2 This is a text document that explains how to do basic things)
What it has:
(most of the basic rts functions of warcraft 3)
- A movement and selections system
- 8 directional graphical system
- Battle system (melee and ranged)
- 8 - directions attacking
- Awesome sprite and damage sync-ing - so it does damage when you want, when the blade hits the enemy!! easily customizable to suit your OWN sprites.
- Attack cooldown - You dont want you unit continusously bashing away.
- basic ai - if there is an enemy close by they will attack it
- resource gathering system
- up to five different resources (you can add more but..)
- automatic gathering (once you select the resource to gather it will return it to the town center when finished, then go back to gther more)
- 2 collection types (in warcraft/starcraft terms 1. mining [woodcutting/crystal collecting] and 2. collecting [goldmines/vespene gas])
- partially modular - most most systems you can delete, or replace with your own, like the movement system, minimap, fog of war
- unregistered fog of war!!
- minimap!
- ablity to create building
- buildings can create units
- building can set waypoints for unit to go to when created
- HUD
- you can make spells and skills fo units
- buildings can queue units
- Magic system - units can cast spells, with cast time and cooldown
- Ailments System - units can be stunned, silenced and more
- HOtkey system - you can easily assign buttons a hotkey
- Notifications System - Get messages to the user ridiculously easy.
- Health Bars on units now show up!
- flexible and customisable
** Multiplayer **
- Teams
- Different Player Colors
- Races (eg. Human, Undead, Orc...)
- Chatting to team mates and to everyone else
- Up to ten players (obviously you can add more but it will get very slow)
- Neutral units
(Australian date format dd/mm/yyyy)
8/1/2013 - Added Multiplayer and updated the How-To document to include details on Multiplayer. Multiplayer requires Gamemaker 8 Pro and Faucet Network Extension 1.4.2.
28/1/2012 - HUGE update!! Added: Notifications system, Spell cooldowns, Hotkey system, Ailments system (units can be stunned, silenced and more!!), Unit Health Bars, and improved all the object templates, for easier updating!! I added several of my own made spells: Chain lightning, chain-stun (target ally units), heal, and Area of Effect Silence (target ally units). I will also be updating the How-To guide soon as well. I've added more pics that showcase the new features so check them out. Also fixed plenty of small bugs.
24/1/2012 - Quick UPDATE!! Just realised the magic system was actually missing quite a bit of code, so i fixed that up for you guys. I also improved the movement system so that it looks nicer. Units no longer pile up on each other.
23/1/2012 - New UPDATE!! fixed a little bug with the fog of war (that annoyingly no one mentioned), and added a Magic Casting System. This engine is now pretty complete. All that is left for me to do is write up a little how-to guide, which will be coming very soon. ENJOIZZ!!
1/11/2011 - Just wanted to say hi! Show me some of the game you have made with my engine already! It has been 2 and a half years!
29/6/2011 - (v 0013.0 update) LAWL!! how long has it been? 6 MONTHS?? You guy have probably thought I abandoned this, BUT fear not! After NOT working on this for such a long time, i have updated it! This update is very different from the previous it has:
- updated fog of war
- unit build queue
- some other crap, which i forgot about
This is nearly done, i might implement a magic system and a hero system. after that, i just need to write a tutorial and it is done!
2/11/2010 - LOL!! >1200 downloads for v11.2 (or 2000 downloads in total!!) :D nice!!. Oh, by the way for those expecting the update, im not releaseing it until ive done a bit more work. sorry for getting you guys excited :/
10/9/2010 - okay, so i came back from gamemaker's block and fixed a bug that was stopping my progress. expect to see an update at the end of this month or the start of next month
7/2/10 - UPDATE!! - this has a few speed improvements and fixes most of the bugs found by stumlehb.
6/2/10 - OIIII!! my fully sick bro, stumlehb, has notified me of a bug in the 0011.0 engine verion - to fix it got to line 21 of the step event of "object_unit_tempplate" and simply ADD " || gathering = true". what you can see in the next update - computer AI (skirmish AI) - you know those computer contolled players in warcraft 3? well they're coming to my awesome 2d rts engine.
25/1/10 - UPDATE!! - this includes: HUD - with minimap, buttons, Fog of war, Buildings. this version is very near completion
17/1/10 - upon fixing a bug, the game now runs 1.5 time faster, then i downloaded gm 8 (heard it was faster) and gained another 2x speed increase. expect another update at the end of janurary.
2/12/09 - i just finished adding fog of war but its too soon to relase another version so itll be with the next one.
NOTE: nearly every thing that you need to modify, to suit your own sprites, can be located in the CREATE EVENT in the object called something like OBJ_UNIT_TEMPLATE, OJB_RESSOURCE_TEMPLATE or ONJECT ENEMY_TEMPLATE.
(most things you will need to edit will be in the create event of the object, and it has been commented)
pics - gathering in motion - http://img691.images...gatheringa.jpg/
fighting - http://img200.images.../fightingg.jpg/
buildings - http://i.imgur.com/OuGzH.jpg
unit queue- http://i.imgur.com/Fi4mI.jpg
magic system (casting fireball) - http://i.imgur.com/hCPi1.png
stunning and silence - http://i.imgur.com/nIkKC.png
notifications - http://i.imgur.com/KPNpW.png
chain lightning - http://i.imgur.com/UqUXI.png
multiplayer - http://i.imgur.com/0vw1e.png
multiplayer - http://i.imgur.com/FnE4r.png?1
(it looks a LOT better when you plug in your own graphics - ive had people send me a file including their own graphics and it just works so well - no extra codeing)
Downloads - (History)
version 0017.5 [GM8Pro] - https://www.box.com/...elwh6kx9005xujg (Latest Multiplayer version)
version 0015.0 [GM8] - https://www.box.com/...ncolurxhqd3pnwo (Latest Unregistered Version)
version 0014.4 [GM7] - http://www.mediafire...q4bgia8mbzimmow
version 0013.4 [GM7] - http://www.box.com/s...na0rk09e0o3avlp
version 0013.3 [GM7] - http://www.box.com/s...3exlgbhizkbiii6 (<- This on has an incomplete magic system.)
version 0013.0 [GM7] - http://www.box.net/s...qgcj978aiuv1ztb (1000+ downloads :D)
version 0011.2 [GM7] - http://www.box.net/shared/6edphh9onp (
its reached 2600 downloads!! yay)
version 0011.0 [GM7] - http://www.box.net/shared/sjs4scq11k
version 0002.8 [GM7] - http://www.box.net/shared/ft6huqbmm6
How-To Guide 1.0 - http://www.box.com/s...i8288opyoz9hdkk
How-To Guide 1.2 - https://www.box.com/...9kzbntbqtsxlvwv
any questions, please ask or even just message (PM) me!
Thanks and good luck with your own RTS games
GM Version: Gamemaker 7/8 Unregistered! (GM8 Pro required for Multiplayer version)
Download: https://www.box.com/...ncolurxhqd3pnwo ( [GM8] v0015.0 Unregistered Version )
Download: https://www.box.com/...elwh6kx9005xujg ( [GM8Pro] v0017.5 Multiplayer Version - Uses Faucet Network Extension 1.4.2)
Faucet Network Extension: http://gmc.yoyogames...howtopic=498062
How-To Guide: https://www.box.com/...9kzbntbqtsxlvwv (v1.2 This is a text document that explains how to do basic things)
What it has:
(most of the basic rts functions of warcraft 3)
- A movement and selections system
- 8 directional graphical system
- Battle system (melee and ranged)
- 8 - directions attacking
- Awesome sprite and damage sync-ing - so it does damage when you want, when the blade hits the enemy!! easily customizable to suit your OWN sprites.
- Attack cooldown - You dont want you unit continusously bashing away.
- basic ai - if there is an enemy close by they will attack it
- resource gathering system
- up to five different resources (you can add more but..)
- automatic gathering (once you select the resource to gather it will return it to the town center when finished, then go back to gther more)
- 2 collection types (in warcraft/starcraft terms 1. mining [woodcutting/crystal collecting] and 2. collecting [goldmines/vespene gas])
- partially modular - most most systems you can delete, or replace with your own, like the movement system, minimap, fog of war
- unregistered fog of war!!
- minimap!
- ablity to create building
- buildings can create units
- building can set waypoints for unit to go to when created
- HUD
- you can make spells and skills fo units
- buildings can queue units
- Magic system - units can cast spells, with cast time and cooldown
- Ailments System - units can be stunned, silenced and more
- HOtkey system - you can easily assign buttons a hotkey
- Notifications System - Get messages to the user ridiculously easy.
- Health Bars on units now show up!
- flexible and customisable
** Multiplayer **
- Teams
- Different Player Colors
- Races (eg. Human, Undead, Orc...)
- Chatting to team mates and to everyone else
- Up to ten players (obviously you can add more but it will get very slow)
- Neutral units
(Australian date format dd/mm/yyyy)
8/1/2013 - Added Multiplayer and updated the How-To document to include details on Multiplayer. Multiplayer requires Gamemaker 8 Pro and Faucet Network Extension 1.4.2.
28/1/2012 - HUGE update!! Added: Notifications system, Spell cooldowns, Hotkey system, Ailments system (units can be stunned, silenced and more!!), Unit Health Bars, and improved all the object templates, for easier updating!! I added several of my own made spells: Chain lightning, chain-stun (target ally units), heal, and Area of Effect Silence (target ally units). I will also be updating the How-To guide soon as well. I've added more pics that showcase the new features so check them out. Also fixed plenty of small bugs.
24/1/2012 - Quick UPDATE!! Just realised the magic system was actually missing quite a bit of code, so i fixed that up for you guys. I also improved the movement system so that it looks nicer. Units no longer pile up on each other.
23/1/2012 - New UPDATE!! fixed a little bug with the fog of war (that annoyingly no one mentioned), and added a Magic Casting System. This engine is now pretty complete. All that is left for me to do is write up a little how-to guide, which will be coming very soon. ENJOIZZ!!
1/11/2011 - Just wanted to say hi! Show me some of the game you have made with my engine already! It has been 2 and a half years!
29/6/2011 - (v 0013.0 update) LAWL!! how long has it been? 6 MONTHS?? You guy have probably thought I abandoned this, BUT fear not! After NOT working on this for such a long time, i have updated it! This update is very different from the previous it has:
- updated fog of war
- unit build queue
- some other crap, which i forgot about
This is nearly done, i might implement a magic system and a hero system. after that, i just need to write a tutorial and it is done!
2/11/2010 - LOL!! >1200 downloads for v11.2 (or 2000 downloads in total!!) :D nice!!. Oh, by the way for those expecting the update, im not releaseing it until ive done a bit more work. sorry for getting you guys excited :/
10/9/2010 - okay, so i came back from gamemaker's block and fixed a bug that was stopping my progress. expect to see an update at the end of this month or the start of next month
7/2/10 - UPDATE!! - this has a few speed improvements and fixes most of the bugs found by stumlehb.
6/2/10 - OIIII!! my fully sick bro, stumlehb, has notified me of a bug in the 0011.0 engine verion - to fix it got to line 21 of the step event of "object_unit_tempplate" and simply ADD " || gathering = true". what you can see in the next update - computer AI (skirmish AI) - you know those computer contolled players in warcraft 3? well they're coming to my awesome 2d rts engine.
25/1/10 - UPDATE!! - this includes: HUD - with minimap, buttons, Fog of war, Buildings. this version is very near completion
17/1/10 - upon fixing a bug, the game now runs 1.5 time faster, then i downloaded gm 8 (heard it was faster) and gained another 2x speed increase. expect another update at the end of janurary.
2/12/09 - i just finished adding fog of war but its too soon to relase another version so itll be with the next one.
NOTE: nearly every thing that you need to modify, to suit your own sprites, can be located in the CREATE EVENT in the object called something like OBJ_UNIT_TEMPLATE, OJB_RESSOURCE_TEMPLATE or ONJECT ENEMY_TEMPLATE.
(most things you will need to edit will be in the create event of the object, and it has been commented)
pics - gathering in motion - http://img691.images...gatheringa.jpg/
fighting - http://img200.images.../fightingg.jpg/
buildings - http://i.imgur.com/OuGzH.jpg
unit queue- http://i.imgur.com/Fi4mI.jpg
magic system (casting fireball) - http://i.imgur.com/hCPi1.png
stunning and silence - http://i.imgur.com/nIkKC.png
notifications - http://i.imgur.com/KPNpW.png
chain lightning - http://i.imgur.com/UqUXI.png
multiplayer - http://i.imgur.com/0vw1e.png
multiplayer - http://i.imgur.com/FnE4r.png?1
(it looks a LOT better when you plug in your own graphics - ive had people send me a file including their own graphics and it just works so well - no extra codeing)
Downloads - (History)
version 0017.5 [GM8Pro] - https://www.box.com/...elwh6kx9005xujg (Latest Multiplayer version)
version 0015.0 [GM8] - https://www.box.com/...ncolurxhqd3pnwo (Latest Unregistered Version)
version 0014.4 [GM7] - http://www.mediafire...q4bgia8mbzimmow
version 0013.4 [GM7] - http://www.box.com/s...na0rk09e0o3avlp
version 0013.3 [GM7] - http://www.box.com/s...3exlgbhizkbiii6 (<- This on has an incomplete magic system.)
version 0013.0 [GM7] - http://www.box.net/s...qgcj978aiuv1ztb (1000+ downloads :D)
version 0011.2 [GM7] - http://www.box.net/shared/6edphh9onp (
version 0011.0 [GM7] - http://www.box.net/shared/sjs4scq11k
version 0002.8 [GM7] - http://www.box.net/shared/ft6huqbmm6
How-To Guide 1.0 - http://www.box.com/s...i8288opyoz9hdkk
How-To Guide 1.2 - https://www.box.com/...9kzbntbqtsxlvwv
any questions, please ask or even just message (PM) me!
Thanks and good luck with your own RTS games
Create Instance Problem
03 January 2008 - 02:52 AM
I've made a button so when you press on it, it makes an object, but when ever i press it it makes more than 1. its always a random number of the object. if your still not understanding what i mean is when i press my button its suppose to make 1 object but instead it makes 34 objects.
heres the code I'm using:
i hope you can help me
heres the file (.gmk)

its an rts just for your information
Controls:
left click - select unit/buillding (units do not have a select circle)
right click - move selected units to point
note. there is a number below the castle which is the number of people.
heres the code I'm using:
Left Pressed (Mouse) instance_create(x,y,object)
i hope you can help me
heres the file (.gmk)

its an rts just for your information
Controls:
left click - select unit/buillding (units do not have a select circle)
right click - move selected units to point
note. there is a number below the castle which is the number of people.
- Game Maker Community
- → Viewing Profile: Topics: rude guss
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content