Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [Request / Listing] assigning items to numbers?  (Read 1446 times)

0 Members and 1 Guest are viewing this topic.
[Request / Listing] assigning items to numbers?
« on: June 14, 2006, 08:24:59 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
Okay I'm doing something wrong, how do you guys assign an item to a number?
« Last Edit: March 09, 2012, 09:17:11 am by Niek »
Logged

dylan623

Re: assigning items to numbers?
« Reply #1 on: June 14, 2006, 08:27:35 pm »
Okay I'm doing something wrong, how do you guys assign an item to a number?
You create a variable called items. Then for button press ask if items is equal to * do something for the item of that number. Did that help?
Logged
Re: assigning items to numbers?
« Reply #2 on: June 14, 2006, 08:41:23 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 448
No, just giving each item a number. Like the variable "global.items" what would I make it equal to if I wanted "slingshot=0,ocarina=1,ect."?
Logged
Re: assigning items to numbers?
« Reply #3 on: June 14, 2006, 08:47:47 pm »
  • ZFGC Founder
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 470
Code: [Select]
global.item[1] = 'slingshot';
global.item[2] = 'ocarina';
etc.
Logged
Re: assigning items to numbers?
« Reply #4 on: June 15, 2006, 06:14:20 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
gm has constants that you can define yourself (i forget where though)
Logged

Pedlya

Pederp
Re: assigning items to numbers?
« Reply #5 on: June 15, 2006, 06:36:39 am »
  • Vote for Harvey!~
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2408
GM gets confusing when it comes to globals, also in your first post say what programming language your using.
Logged
So what! I wanna get out! 'Cos there's so much out there! So many different people, living different lives! Incredibly good guys, bad guys... Folks completely different from us! It's one huge melting pot! See, it's not about success, dying in the streets, who's better, who's not! I just want to be a part of it! I realized that even if I've no connections, no talent, even if I'm one big loser, I want to use my hands and feet to think and move, to shape my own life! We can just die here or we can try, see what we've got!
Re: assigning items to numbers?
« Reply #6 on: June 15, 2006, 01:55:12 pm »
  • ZFGC Founder
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 470
Why would GM get confusing with global variables? Anway, defining constants is done in "Global Game Settings".
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.157 seconds with 52 queries.