Pages: 1 ... 62 63 [64]
  Print  
Author Topic: Game Maker Help Thread!  (Read 172930 times)
TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #945 on: February 11, 2014, 06:19:47 PM »

By far the most confusing error message I've ever had.
Quote

___________________________________________
ERROR in
action number 1
of Create Event
for object oScreen:

Error in function real().
This probably has something to do with the music. There's no "real()" function anywhere.
Actually I bet that has something to do with scrReadStats and your increased number of levels. It is pretty unhelpful though Tongue

Run the game in debug mode and see what the value of global.musHell is.
Edit: also in the debug mode there's a way to execute code, try running SS_StopSound(global.musHell); in it manually and see what happens
« Last Edit: February 11, 2014, 06:25:17 PM by TyrOvC » Logged

SnoruntPyro
Shoot
*
Posts: 18


Class-A Douche


View Profile
« Reply #946 on: February 11, 2014, 06:52:12 PM »

scrReadStats looks fine:
Quote
for (i = 0; i < 20; i += 1)
{
    global.levelDeaths = 0;
}

for (i = 0; i < 27; i += 1)
{
    global.enemyDeaths = 0;
}

for (i = 0; i < 13; i += 1)
{
    global.miscDeaths = 0;
}

for (i = 0; i < 25; i += 1)
{
    global.enemyKills = 0;
}


musHell seems to be equal to 1 rather than 43255608. Also, your code didn't work. I'll check all of the supersound scripts.

BONUS: When coding...goes horribly wrong.


EDIT: I don't see anything in the supersound scripts.
« Last Edit: February 11, 2014, 07:20:32 PM by SnoruntPyro » Logged

wow
Bae
Mossy
*
Posts: 1696


Pro YoCo strats #AGDQ2014 #GYCL


View Profile
« Reply #947 on: February 11, 2014, 08:04:40 PM »

99 bluecircle
Logged


[0/18]complete

think about it. Zom-bees.
bloxxin
Mossbaby
*
Posts: 410


Long time no see...


View Profile
« Reply #948 on: February 11, 2014, 08:31:39 PM »

99 bluecircle

It's obviously TLS's big sapphires, I mean blue donuts.
Logged

TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #949 on: February 11, 2014, 10:46:23 PM »


musHell seems to be equal to 1 rather than 43255608. Also, your code didn't work. I'll check all of the supersound scripts.
Odd, should be some random high number that super sound assigns as the identity of the song. So somewhere between when the song is first played and when the stop music script is called, something changes global.musHell? Looks like a lead.


Edit:
That stuff I posted for Bae was only meant for custom levels, didn't mean for you to try that, sorry.
« Last Edit: February 12, 2014, 12:25:25 AM by TyrOvC » Logged

SnoruntPyro
Shoot
*
Posts: 18


Class-A Douche


View Profile
« Reply #950 on: February 12, 2014, 03:34:53 PM »

I checked, and the music seems to work completely fine in the level editor.

EDIT: oh wow
The thing...that was causing the problem...was something that I put in the creation code script in all the rooms to try to correct the problem.

I...I...wow.
« Last Edit: February 12, 2014, 03:45:18 PM by SnoruntPyro » Logged

wow
Moloch
Mosskid
*
Posts: 565


View Profile WWW
« Reply #951 on: February 13, 2014, 09:12:53 PM »

Edit:
That stuff I posted for Bae was only meant for custom levels, didn't mean for you to try that, sorry.

FYI I also used that code for adding music to custom levels and it worked without problems. The only additional thing I had to do was copy the code to restart the music to the TLS/Editor Plus checkpoint loading script.
Logged

Shrek
Shoot
*
Posts: 11



View Profile
« Reply #952 on: March 29, 2014, 06:53:56 PM »

What are the essentials of a room? I tried to make a new room but there's no HUD, the window's small, and the camera doesn't move. I feel like I'm missing a few objects as currently I only have four(oLevel, oGame, oPlayer1, and some ground).
What do I need to make the room function correctly? It's the 16th level, if that changes anything.
I'm not trying to make any random elements, I just want an empty room with walls and the player. Sorry if this question has been asked already.
Logged
bloxxin
Mossbaby
*
Posts: 410


Long time no see...


View Profile
« Reply #953 on: March 29, 2014, 07:20:56 PM »

@Shrek
~~Lack of HUD:
IDK, never experienced this problem, or forgot, sorry. I'll try to find it later though, but the lack of HUD may be because the window was to small.

~~Small Window:
There is an object called oScreen. Go to the last script in the create event and find the large-and-almost-identical block of code at the bottom. Copy one and paste it, changing one of the rooms with the proper room name of your empty room.

Here is an example. Change 'rLevel' into the name of your room.
Code:
room_set_view(rLevel,0,true,0,0,320,240,0,0,w,h,128,96,-1,-1,oPlayer1);

~~Camera Doesn't Move:
The problem is fixed by doing the above fix.
Logged

Shrek
Shoot
*
Posts: 11



View Profile
« Reply #954 on: March 29, 2014, 07:43:06 PM »

Thank you for your quick reply, Bloxxin! oScreen probably should've been the first place for me to look Tongue
I still have to scavenge the code to get the HUD to show up, though. Also, I can't access my items through switching or through hotkeys. I remember a script somewhere called IsRealLevel() that could probably help...
Edit: IsRealLevel was just for stats.txt, but IsLevel made the HUD appear and even placed an invincible ceiling and walls!... I'll have to place invincible floors myself, but that shouldn't be too difficult.
« Last Edit: March 29, 2014, 07:54:35 PM by Shrek » Logged
bloxxin
Mossbaby
*
Posts: 410


Long time no see...


View Profile
« Reply #955 on: March 29, 2014, 08:03:02 PM »

That's good you found it yourself! I was looking at the scrDrawHUD code, saying it is called in the draw event of oGame, but it doesn't exist there.
The script name you mentioned made me look for the script isLevel, I found it and was about to mention it to you. before then you edited.
Logged

Hedwirez
Seedling
*
Posts: 2


View Profile
« Reply #956 on: June 19, 2014, 03:31:35 AM »

I'm trying to reverse engineer the Spelunky source code to get an idea of how to build a platformer but am getting pretty stuck on the basics. I understand that the majority of the movement code is in the characterStepEvent but can't find the code that actually commits the movement (i.e. changes the x variable of the player). Can anyone point me in the right direction please?
Logged
Moloch
Mosskid
*
Posts: 565


View Profile WWW
« Reply #957 on: June 19, 2014, 04:34:43 AM »

I'm trying to reverse engineer the Spelunky source code to get an idea of how to build a platformer but am getting pretty stuck on the basics. I understand that the majority of the movement code is in the characterStepEvent but can't find the code that actually commits the movement (i.e. changes the x variable of the player). Can anyone point me in the right direction please?

Near the bottom of characterStepEvent you'll see the moveTo script called.

Spelunky used this platformer engine as a base. It's probably more complicated than it needs to be..I recommend reading old forum posts, blogs and tutorials by Matt Thorson, Kyle Pulver (xerus) and Chevy Ray for good platforming code ideas. You might have to dig a bit, since they have all since moved on from Game Maker. Here's a few links to get you started..

http://forums.tigsource.com/index.php?topic=5790.0
http://forums.tigsource.com/index.php?topic=3142.0
http://forums.tigsource.com/index.php?topic=7386
Logged

Hedwirez
Seedling
*
Posts: 2


View Profile
« Reply #958 on: June 22, 2014, 09:33:47 AM »

Amazing, thanks. I now have a character that moves!
Logged
Pages: 1 ... 62 63 [64]
  Print  
 
Jump to: