View Full Version: [Code] Wall Ammo Racks - KyleRTCW

wolfers >>Coding Alliance >>[Code] Wall Ammo Racks - KyleRTCW


<< Prev | Next >>

KyleRTCW- 01-17-2005
[Code] Wall Ammo Racks - KyleRTCW
Hello, welcome to my second tutorial here at WolfPlanet Forums In this tutorial, I will be showing you how to make a wall into an Ammo Rack. Credit for this feature goes to Joe who is at DHW Forum but is inactive. Which is why I decided to release this. You may need to adjust this tutorial based on your Game. Read on. Step 1: Open up WL_AGENT.C and do a search for: // use elevator You should see this: if (!buttonheld[bt_use] && doornum == ELEVATORTILE && elevatorok) { // // use elevator // buttonheld[bt_use] = true; tilemap[checkx][checky]++; // flip switch if (*(mapsegs[0]+farmapylookup[player->tiley]+player->tilex) == ALTELEVATORTILE) playstate = ex_secretlevel; else playstate = ex_completed; SD_PlaySound (LEVELDONESND); SD_WaitSoundDone(); } else if (!buttonheld[bt_use] && doornum & 0x80) { buttonheld[bt_use] = true; OperateDoor (doornum & ~0x80); } else SD_PlaySound (DONOTHINGSND); } Modify to look like this:if (!buttonheld[bt_use] && doornum == ELEVATORTILE && elevatorok) { // // use elevator // buttonheld[bt_use] = true; tilemap[checkx][checky]++; // flip switch if (*(mapsegs[0]+farmapylookup[player->tiley]+player->tilex) == ALTELEVATORTILE) playstate = ex_secretlevel; else playstate = ex_completed; SD_PlaySound (ERLAUBENSND); SD_WaitSoundDone(); } // Ammo Rack if(!buttonheld[bt_use] && doornum == 25) //WALL-ID in FloEdit, IMPORTANT { buttonheld[bt_use] = true; if(gamestate.ammo == 99) return; // Player has 99 ammo tilemap[checkx][checky]++; // Goes from WALL 25 to 26 SD_PlaySound(GETAMMOSND); GiveAmmo (50); // or to your likings StartBonusFlash(); } else if (!buttonheld[bt_use] && doornum & 0x80) { buttonheld[bt_use] = true; OperateDoor (doornum & ~0x80); } else SD_PlaySound (DONOTHINGSND); } if(!buttonheld && doornum == 25) That 25 indicates what wall id the ammo rack is. You can get this wall id in FloEdit and I think in WDC (not sure) Wall ID 25 must be the ammo rack texture on both sides and wall-id 26 must be the empty wall rack after the player took the ammo on both sides But remember, you can use any wall number that you wish. Compile and Link up, you should now have Ammo Racks :)


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.