Jump to content

Kan3

Members
  • Posts

    790
  • Joined

  • Last visited

Everything posted by Kan3

  1. I could finally get back to work on some sprites and finish the walking animation (front) for the undog Also, I'm going to finish rotations (one day...) for this "beauty"
  2. The look of this thing is just great :D I don't even know how you managed to make it so spot on
  3. Going live in a moment with more of the hispanic community project :D

    Brothers know how to map!

     

    Kan3V

  4. Attempting to level up the zombie dog of the previous page
  5. Usually, when you try to play a sound you have to use the logical name and not the lump name, so in your case: PlaySound(34, "world/dooropen"); The use of "world" is pointless in this situation (unless you're just using it to better organize your file) because you're not defining it as an ambient sound.
  6. Yeah, unfortunately to have the "whole package" you have to use the Hexen class system and let the player choose a class before starting a game. Otherwise using a morphing powerup, although that is not a real class change.
  7. Why not? Of course you can define States for players, you just need to make a new player class and that's it, unless you mean something else
  8. It has to set the sprite every tic because they're not changing the player class states, but, if you do like in this example, setting every sprite name of every frame to #### will tell the engine to keep the last sprite index used, resulting in a permanent sprite switch.
  9. Yeah, well, it doesn't work because nothing in it actually makes sense D: script 1 (void) { int i; int roomTID; roomTID = FindActor("20"); //There's no ACS function called FindActor() if (roomTID != 0) { for (i = 0; i < 8; i++) //You're initializing a loop with int i but then you never use it { if (ThingCountName("4") > 0) //You're using ThingCountName wrong { int monsterTID = ActivatorTID(); if (monsterTID != 0) { Teleport(0, monsterTID, roomTID); //You're using Teleport wrong } } } } Door_Open(2, 16, 1); Door_Open(3, 16, 1); Door_Open(4, 16, 1); } https://zdoom.org/wiki/ThingCountName https://zdoom.org/wiki/Teleport
  10. A bit of a darker realm you're delving here x) Anyhow, there's no need of cvars, you only need global arrays and player numbers I believe something like this should work: global int 0: yvar[]; //our global array that you will be able to access from every map (you should be able to set it up in any map script, without having to make a ACS lump in your pk3) script "DoStuff" (void) { //it lets every single player to have its own variable that it will be stored in the global array and will be accessed depending on the player who activates the script based on his number, which differs from player to player yvar[PlayerNumber()]++; int x = yvar[PlayerNumber()]*25 + 100; etc.. I don't think you'll need anything else actually, but maybe you'll need to first define a value for the array variables with something like this: script "VarSetup" ENTER { yvar[PlayerNumber()] = 0; }
  11. If that first part is not inside of a loop, but you're calling the script multiple times, then the value of y keeps on resetting. To solve this you can just define the integer outside of the script instead. int y; script "DoStuff" (void) { y++; int x = y*25 + 100; etc...
  12. To call for the death sound you will need to call for A_Scream since your actor is not a projectile. Same goes for the other one, since your actor is not a projectile spawned by something, it won't play the sound in the spawn state, nor it will play it in the see state because it is not a monster (I don't actually think it will ever be able to get to the see state at all). So here you need to call for A_StartSound once and check for players in other means or make the actor an immovable monster like thing.
  13. With event handlers you should be able to do all of this, even though it is not an easy task
  14. This is mine x) Made it for my megawad Declared New Apocalypse Never released this angelic puppy alone, but here's all of the sprites It's a simple rework of the standard MBF helper dog to make it more zombie-plagued like. I think it still needs some adjustment here and there, maybe I'll try to polish it a bit one day
  15. Unfortunately I couldn't recreate that "behavior": I set up 6 shotgunners with your same script and let them infight without killing myself any one of them except for the last one, but the script run 6 times (one for each monster) as expected. Anything that may kill more than 1 monster in the same tic can cause the issue, literally, simply because the same script cannot run simultaneously (unless using ExecuteAlways). If you never encountered this kind of issue while killing 2 or more monsters at once, is because they didn't die in the exact same tic.
  16. It's weird that the infighting is causing this issue, because the script (if called from a monster) will activate whenever the monster dies, no matter how. Usually what causes issues in examples like this is when 2 or more monsters die simultaneously. You can actually get rid of any possible issue with a script that's not triggered by the monsters though, like this: //let the player activate a trigger to call this script script "LightRoomEncounterCounter" (int tid) { //you could also have a ENTER or OPEN script if you want to let it run at the very beginning of the map, but then you can't use the tid argument while(ThingCount(T_NONE, tid) > 0) Delay(7); //the script will be stuck in this loop until there are monster with the specified "tid" //when they are all dead, then it will pas through Delay(105); Sector_SetColor(22,255,255,255,0); Light_ChangeToValue(24,150); Delay(70); Door_Open(21,32); Floor_LowerByValueTimes8(23,32,20); } just give all of the monsters you want a specific tag and set the script argument (in the action/tag/misc. tab of the trigger) "tid" to be exactly that number and you're done. Remember, of course, to not give other monsters that are not meant to be killed in this instance the same tag.
  17. Flip the teleport trigger lines to face the other side (look at the tiny middle segment, it needs to face the monster) by pressing F
  18. It's the sector tag. When you right-click a sector, at the bottom of the window that opens up, you'll find the Identification tab, there you can give your sector any tag you want (must be an integer)
  19. And again you just copied and pasted here and there without knowing what you were doing because you didn’t even tried to understand
  20. Like I said earlier, you first need at least a solid base to even start doing what you're attempting, which is not hard at all, but you're clearly missing essential stuff by looking at this abomination: "johnnyCoins" = CheckInventory("customCoin") Let's start from the beginning: You need to have a script with an activator and since you you to have the script to run immediately when a player is in game, you should go for a ENTER script, which will also set the player entering the game as the script activator. You also want the script to run continuously, so you need a loop. Setting up a "forever loop" is pretty straight forward, While(true) is the "golden" one. You want to get the amount of a certain item the caller of the script has, so you'll just need an integer value that you can "retrive" using CheckInventory since the function returns an int ("The function will return the number of items the actor carries") To simplify the message later, you can cast a new int variable with the name you wish; let's call it jc. So, to set your jc int to be equal to the amount of item x the script activator has you just need to: int jc = CheckInventory("customcoin"); Now you can write your message on the activator screen using HudMessage using jc as your int to be shown like this: HudMessage(s:"Johnny Coins: ", i:jc; HUDMSG_PLAIN, -1, CR_GOLD, 0, 0, 0); Be careful with the message offsets, you might need several attempts to get it in the position you want. Also, you might want to have a HoldTime of 0, so that your message will never disappear until a message with the same id is used, which is exactly this case here, because whenever the script loops it will write the same message with the same id (-1) replacing the old one. Before ending the loop, it's important to have a delay or you might get a freeze due to the script running with no pause. In the end: script "Droids" ENTER { While(TRUE) { int jc = CheckInventory("customCoin"); HUDMessage(s:"Johnny Coins: ", i:jc; HUDMSG_PLAIN, -1, CR_GOLD, 0, 0, 0); Delay(32); } } Although I will insist on this: looking for direct answers and pre-made codes will just add up more confusion and you'll never get a grasp on how to do it on your own
  21. Class EyeBulb : Inventory { Default { //$Category Potions/Ingredients +FLOORCLIP Inventory.MaxAmount 100; Inventory.PickupMessage "You picked up an eye bulb."; Tag "Eye bulb"; } States { Spawn: EYBL A 2100; Stop; } } This is a simple item that I made, there's nothing behind it, it's exactly like your coin. If that doesn't work it means that you're doing something wrong somewhere else. Since you're completely new to this kind of stuff it's definitely not advisable to start by modifying/adding stuff in huge and complex mods or you'll get lost in no time like in this case
  22. The code has a lot of issues and you're even overcomplicating your life. Here's the inventory properties. For the future, it's better to go through the properties and flags of the predefined zdoom classes instead of trying to extrapolate stuff from github or forums, because you already have everything that you need there without trying to rewrite functions that you'll only need for something far more complicated than this.
  23. It's should be perfectly possible like you're already doing, so I don't know where's the issue here. The only thing I notice is that with the first line you're teleporting a thing tagged 113 to a mapspot tagged 114, then you're trying to teleport a thing tagged 114 twice to a mapspot tagged 120. Just for clarification: the key will always have the same tag you gave it, while you have to use different tags for different mapspots or you get a random chance of spawning between those with the same tag.
×
×
  • Create New...