hyperme
Mosskid

Posts: 674
|
 |
« Reply #585 on: September 18, 2010, 01:39:41 PM » |
|
How do I stop Tunnel Man from breaking a Room to bits with his mattock? Such as similar to the Bonus Challenge Rooms.
|
|
|
|
|
Logged
|
|
|
|
halibabica
Bossy
Mossy

Posts: 1920
*whipcrack*
|
 |
« Reply #586 on: September 20, 2010, 12:04:36 PM » |
|
Depending on what room it is, find the object that regulates it (like oTitle for the title screen, oSunRoom for the sun room, etc). Then, in its create event, add:
with oSolid {invincible = true;}
That will make all the solid objects present indestructable, even to explosions.
|
|
|
|
|
Logged
|
|
|
|
Cyclone
Bean

Posts: 108
OLMEC SLAM!!!
|
 |
« Reply #587 on: October 18, 2010, 05:26:15 PM » |
|
How do I make a new variable in GML? It says I just need to name it and assign a value, but when I try to do so, I get this error message: ___________________________________________ ERROR in action number 3 of Step Event for object oBluealien:
Error in code at line 17: global.bluealiens += 1; ^ at position 10: Unknown variable bluealiens (The coding is for a modified and recolored Alien that I got ingame by copying the coding for randomly generating snakes.)
|
|
|
|
|
Logged
|
Omnomnomnom
|
|
|
|
Moloch
|
 |
« Reply #588 on: October 18, 2010, 06:11:25 PM » |
|
Try adding global.bluealiens = 0 to the oGlobals object (Create event).
|
|
|
|
« Last Edit: October 18, 2010, 06:35:25 PM by Moloch »
|
Logged
|
|
|
|
Cyclone
Bean

Posts: 108
OLMEC SLAM!!!
|
 |
« Reply #589 on: October 18, 2010, 07:10:03 PM » |
|
Where in the code should I add it? EDIT: I'm using the TLS source code. Does that make a difference?
|
|
|
|
« Last Edit: October 18, 2010, 07:13:21 PM by Olmec 74 »
|
Logged
|
Omnomnomnom
|
|
|
Arucard
Mossy

Posts: 2676
Dance Forever Yeti :D
|
 |
« Reply #590 on: October 19, 2010, 07:43:27 AM » |
|
I don't think it should matter, but you can add it to the top to make it easier to get to if you need it.
|
|
|
|
|
Logged
|
Self proclaimed grammar nazi It's no use, go run and hide. You can't escape this sea of sunken eyes!
|
|
|
Cyclone
Bean

Posts: 108
OLMEC SLAM!!!
|
 |
« Reply #591 on: October 20, 2010, 04:08:34 PM » |
|
Thanks.
|
|
|
|
|
Logged
|
Omnomnomnom
|
|
|
|
Moloch
|
 |
« Reply #592 on: October 20, 2010, 06:30:05 PM » |
|
Just to correct myself, I wanted to tell you to put it in the scrClearGlobals script (you will see all the other globals initialized there) but I didn't have access to the source at the time. In this case it probably doesn't matter, since scrClearGlobals is called by oGlobals when the game starts. If you add any other new globals to the game, put them in scrClearGlobals so they get reset when the player dies and starts a new game.
|
|
|
|
|
Logged
|
|
|
|
Cyclone
Bean

Posts: 108
OLMEC SLAM!!!
|
 |
« Reply #593 on: October 21, 2010, 06:25:24 PM » |
|
OK, now that I've gotten the enemy to work properly, how do I make the stat file record kills for it?
|
|
|
|
|
Logged
|
Omnomnomnom
|
|
|
|
Moloch
|
 |
« Reply #594 on: October 22, 2010, 11:51:04 AM » |
|
I was hoping you wouldn't ask that.  I'll tell you were to look and hope you can figure the rest out. In scrReadStats you need to increase the size of the global.enemyDeaths and global.enemyKills arrays by 1 (there are initialized in the FOR loops at the top). The stats for your new enemy will probably now be global.enemyDeaths[25] and global.enemyKills[23]. Set the FOR loops further down that read the file to read that extra slot too. You should also change the filename used for the stats file, or else things will be messed up when reading/writing to the 'official' TLS stats format. Then add your new enemy entry to the enemy kills and enemy deaths lists in scrWriteStats. In oEnemy (Collision with oCharacter event) you'll see where the stats are changed when the player dies from touching an enemy. In your new enemy object (Step event) you'll see where the global.enemyKills is changed when the enemy dies.
|
|
|
|
|
Logged
|
|
|
|
halibabica
Bossy
Mossy

Posts: 1920
*whipcrack*
|
 |
« Reply #595 on: October 22, 2010, 11:55:40 AM » |
|
You may actually have an easier time adding a separate global variable for the kills and deaths by this new enemy. Take a look at how I added Spelunker and Tunnel Man to the stats files for reference. You'll still have to look in the same places Molok said, though.
|
|
|
|
|
Logged
|
|
|
|
marsgreekgod
Big Bossy
Mossy

Posts: 9773
The will of the Galaxy.
|
 |
« Reply #596 on: October 27, 2010, 09:57:07 PM » |
|
I know this should be easy, but it keeps gliching out somehow so yeah..I hate having to ask this but:
How do you make ladders show up on the title screen as you unlock shortcuts?
|
|
|
|
|
Logged
|
Show your power, Gun Del Hell! Show them their fate! Yes! Yes! Yes! Yes! Yes! Here we go! Let's go, go, go, go, Django! Light and Dark! It comes down to this! Be afraid, Sun!
|
|
|
halibabica
Bossy
Mossy

Posts: 1920
*whipcrack*
|
 |
« Reply #597 on: October 28, 2010, 04:09:05 AM » |
|
In the oTitle object's Create event, it places ladder parts and doors on the title screen depending on how many shortcuts you've unlocked. If you want them to be permanent, you can add them to the room yourself. If you want the title screen to to spawn them under specific requirements, add them to the Create event with your prerequisites.
|
|
|
|
|
Logged
|
|
|
|
marsgreekgod
Big Bossy
Mossy

Posts: 9773
The will of the Galaxy.
|
 |
« Reply #598 on: October 28, 2010, 08:39:07 AM » |
|
In the oTitle object's Create event, it places ladder parts and doors on the title screen depending on how many shortcuts you've unlocked. If you want them to be permanent, you can add them to the room yourself. If you want the title screen to to spawn them under specific requirements, add them to the Create event with your prerequisites.
Yeah thats the part I know. I am just wondering what variables they save the shortcuts under...
|
|
|
|
|
Logged
|
Show your power, Gun Del Hell! Show them their fate! Yes! Yes! Yes! Yes! Yes! Here we go! Let's go, go, go, go, Django! Light and Dark! It comes down to this! Be afraid, Sun!
|
|
|
halibabica
Bossy
Mossy

Posts: 1920
*whipcrack*
|
 |
« Reply #599 on: October 28, 2010, 02:12:14 PM » |
|
Shortcuts are saved as part of a high score, actually. I've never really been clear on how that works. The best advice I can offer is to look at what Derek did to make the shortcut doors appear and do something similar.
|
|
|
|
|
Logged
|
|
|
|
|