If this was a shop, then it would allow you to use the dynamite in a separate room (game level) after purchase. As soon as you leave that shop room your game will have forgotten everything that happened in the last room.
this isn't very helpfull because my entire world map is in one room. and when u open the shop room... everything is cleared. i want a small window shop instead of a entire room :S
hey can some1 help me it works but i added another room the starting room then you can walk to the shop and enter it but i added coins aswell and you collect them and they cum up on the top of the screen but when i go into the shop its back to the default coin amount
You need to make the coin variable global, also if the coin variable in in the player object, remove it from that, make a obj_coin and put in the create event : global.coins=0. or whatever you want to call the coin variable, then make the obj_coin persistent, and place it in the first room, the player object can still display the number himself for how many coins you want if you want, but obj_coin could also do that.
sounds like u have ur start off money on relative on ur controler simply untick relative and it should fix. yea i kno 3 months late but other ppl could have the same problem
I'm not good at coding, but what happens when say you buy a shotgun, and then go to the next room. How will the game know to allow you to use that weapon? And when you get money and such, should i just make it where like after each room ( level ) you go back to the room that = shop? Or will the shop be reset to the origional numbers and settings? Thats all that counfuses me.
@DANNYSPIKEYBOI911 make something like (\/ means start of code and /\ means end) \/ if global.buyshotgun = true then global.shotgun = true else if global.buyshotgun = false then global.shotgun = false /\ and then in your controller make \/ if global.shotgun = true then sprite_index = spr_playershotgun /\ Lol i haven't tried this code yet though
For the exp to level do this. (in 2 posts because it's too long.) obj_controller Create: global.xp = 0 global.level = 1 global.nextlevel = 10 Step: if global.xp >= global.nextlevel { global.level+=1 global.nextlevel += 10 global.xp = 0 }
well my problem is, how do you make a game. That controls if you buy an item, and then in the next levels, it should spawn the items that you buy'ed :/
of course you still got 5/5 + favorited + subscribed.
i wonna do make it so, when you buy a thing, then an object (with that thing) spawn in all the next levels, and when you played a level, and get back to the shop, then all the stuff that you buyed before shoukd still be on "buyed" :)
whatss the song !!!!!!!!!!!! plz
pee4947 1 month ago
Know its old, BUT THANK TOU :D
MoreCoffiePlease 2 months ago
And what did I learn from this, NOTHING!
Gamemaker247 2 months ago
can u type in the exact code at 3:03 in a reply so i can copy and paste it pleez
sticktoonspro1 3 months ago
@sticktoonspro1 Are you lazy or what?
ervinasroblox3 1 month ago
i luv dynomite
Musonator 3 months ago
Thanks you for this tutorial! Now i can start making my new game!
IsNik333 3 months ago
Whats the name of this song?
imjustpork1 7 months ago
Ronaldo FTW! :P
PikerAndProtoShow 8 months ago
@177Rolando717 baboy time
tantanzip 9 months ago
177Rolando717
tantanzip 9 months ago
If this was a shop, then it would allow you to use the dynamite in a separate room (game level) after purchase. As soon as you leave that shop room your game will have forgotten everything that happened in the last room.
superant10000 11 months ago
instead of global.coins=100 or global.coins>100 you can just do global.coins=>100
cheatengine54 1 year ago
HELP--what happened!?
FATAL ERROR in
action number 1
of Mouse Event for Left Pressed
for object obj_dynomite_unselected:
COMPILATION ERROR in code action
Error in code at line 13:
at position 1: Variable name expected.
NarutoFanGirl753 1 year ago
thanks, this we help me out alot
NarutoFanGirl753 1 year ago
@177Ronaldo717 is the music from unreal tournament?
flamesdemon19 1 year ago
Ur an expert ..
LykanMRBS 1 year ago
THANKS!!! :D
factyyy2k10 1 year ago
I GOT THIS PIECE OF SHIT!
___________________________________________
FATAL ERROR in
action number 3
of Mouse Event for Right Released
for object FAIRPURCHASE:
COMPILATION ERROR in code action
Error in code at line 12: }} ^
at position 2: Assignment operator expected.
xLightningWolFx 1 year ago
This has been flagged as spam show
ERROR in
action number 1
of Draw Event
for object Store Controller:
Error in expression:coins position 1: Unknown variable coins
HunterMSmith 1 year ago
ERROR in
action number 1
of Draw Event
for object Store Controller:
Error in expression:coins position 1: Unknown variable coins
HunterMSmith 1 year ago
THANKS for big letters! =)
heppu20 1 year ago
this isn't very helpfull because my entire world map is in one room. and when u open the shop room... everything is cleared. i want a small window shop instead of a entire room :S
PROsnipekid 1 year ago
___________________________________________
FATAL ERROR in
action number 1
of Mouse Event for Left Released
for object obj_sword:
COMPILATION ERROR in code action
Error in code at line 7: global.gold(-=100) ^
at position 14: Unknown function or script: gold
i named mine gold not coins for all the things you did coins i did gold and i got this error help!
DCodeMast3r 1 year ago
how do you get the weapon work when you buy them or using it for your energy bar
Edje1953 1 year ago
it doesnt draw the money on the screen what hapepned?
GingerWithAGuitar 1 year ago
Thanks dude! :)
kristofferht 1 year ago
How do you make it equiped to your player after you buy it. please reply soon.
xdarrenxtrx 2 years ago
hey can some1 help me it works but i added another room the starting room then you can walk to the shop and enter it but i added coins aswell and you collect them and they cum up on the top of the screen but when i go into the shop its back to the default coin amount
Deathbringer3557 2 years ago
You need to make the coin variable global, also if the coin variable in in the player object, remove it from that, make a obj_coin and put in the create event : global.coins=0. or whatever you want to call the coin variable, then make the obj_coin persistent, and place it in the first room, the player object can still display the number himself for how many coins you want if you want, but obj_coin could also do that.
ShoenenJumpLuffy 2 years ago
omg thank you!
I was making a game and this helped me allot! My game?
Buy fighters, and let them fight to your opponent! Ty so much!
hethazzohotel 2 years ago
You could of just done :
{
if global.coins <= 100
}
Kytuzian 2 years ago
Sandstorm - DaRude
FTW
FuIIySick 2 years ago
DaRule
a009omdu 2 years ago
what is the name of this song?....
enokmalik 2 years ago
how can you use the weapon????
MrFunnyMan159 2 years ago
I have 1000 i bought a stick for 100 and my coins were 900 when i go to the next room after buying the object my money changes back to 1000 Help Plz
nick9502 2 years ago
i dont know if youll get this, its 2 months late, but if you could message me all the scripts youre using i may be able to help
UtubeAREgrapes 2 years ago
try setting it to constant
TraceguyRune 2 years ago
@nick9502
Try making everything persistent. The button is under the Depth.
HeroOfTime121 2 years ago
sounds like u have ur start off money on relative on ur controler simply untick relative and it should fix. yea i kno 3 months late but other ppl could have the same problem
gravity21rules 2 years ago
The code for minusing the money... Click on it an d check relative
a009omdu 2 years ago
This has been flagged as spam show
nice song :D
IsaProducitons 2 years ago
Love your desktop wallpaper ^^
Graffix790 2 years ago
How can i make a city.. with NPC selling stuff ?
thanks!
5/5
Diabolist10 2 years ago
I'm not good at coding, but what happens when say you buy a shotgun, and then go to the next room. How will the game know to allow you to use that weapon? And when you get money and such, should i just make it where like after each room ( level ) you go back to the room that = shop? Or will the shop be reset to the origional numbers and settings? Thats all that counfuses me.
DANNYSPIKEYBOI911 2 years ago 2
Cakekid2500 1 year ago
bend over
5555eggfuzz 2 years ago
whats the name of thaat song send it please
maddenplayer34 2 years ago
Sandstorm-By Darude
Give me your email if you want it.
177Ronaldo717 2 years ago
@177Ronaldo717 BREAKING THE LAW!!!!
warandmorewar 1 year ago
uh I made him go to a new room and the coins = 0 after I gto 100 coins how can i fix that
diademmaster45 2 years ago
make obj_goldcontroller
create:
set variable: global.coins, 100
draw:
draw variable: global.coins, (x,y)
only put it in one room and make is persistent.
177Ronaldo717 2 years ago
well it'sokay now I just made draw and set 2 different object and it worked
diademmaster45 2 years ago
@177Ronaldo717 i'm sorry to bother you, but i am having trouble seeing these things: ( , _ " }
could you possibly copy you script and paste into your information box? my game won't start cause i mis-typed something
NarutoFanGirl753 1 year ago
@177Ronaldo717 yey i got it
NarutoFanGirl753 1 year ago
Like portals!
Diabolist10 2 years ago
Ronaldo!
I'm asking if you know how to make mobs + ask them!
Please ANSWER!
Diabolist10 2 years ago
Ask them what?
177Ronaldo717 2 years ago
177Ronaldo717 could you help me how to make mobs to ask them ? example : Quests ?
Portals ? guards ? like this\
Thank you! U ARE THE best! 5/5
Diabolist10 2 years ago
177Ronaldo717 You are the greatest Game Maker tutorial maker :P
I'm asking how to make ExP to level !
And how can we take things like this tutorial "Game Maker-Basic Shop Tutorial" but to my bag :P
thanks!
Diabolist10 2 years ago
In your left pressed event on obj_dynomite
copy this code before the "else" part.
dynomite=true
and in the create for obj_controller do this.
dynomite=false
then in the step event for obj_inventory
do this, if dynomite=true (whatever happens to the inventory if you bought it.)
If you need me to make an inventory tutorial i'll do it but look around youtube before asking me.
Hope it helps!
177Ronaldo717 2 years ago
177Ronaldo717 2 years ago
Draw:
draw_text(x,y+10,"XP:"+string(global.xp))
draw_text(x,y+10,"Next level:"+string(global.nextlevel))
Whatever gets his exp up, eg: collision with obj_coin.
global.xp += 2
Hope it helps!
177Ronaldo717 2 years ago
lol two post nice tuts man
kooperbro 2 years ago
wait wouldn't you also put in the collision:
global.nextlevel-=2
cuz doesn't next level show you how much until you're at the next level?
windmillproductions1 2 years ago
wait never mind sorry that was me being retarded never mind
windmillproductions1 2 years ago
OMG NICE!!
Diabolist10 2 years ago
well my problem is, how do you make a game. That controls if you buy an item, and then in the next levels, it should spawn the items that you buy'ed :/
of course you still got 5/5 + favorited + subscribed.
malthe122 2 years ago 4
ok I'll make a new video of it but what should happen when you buy it?
177Ronaldo717 2 years ago
great and original tutorial as usual
leojisgood 2 years ago
i wonna do make it so, when you buy a thing, then an object (with that thing) spawn in all the next levels, and when you played a level, and get back to the shop, then all the stuff that you buyed before shoukd still be on "buyed" :)
malthe122 2 years ago