09-11-2006, 07:55 PM | #41 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Well, I'm glad to hear that at least.
However... -_-; I got a new problem, although this time it's not as much an EDuke-specfic problem as it is just probably me not getting something with the normal CON coding. Here's the deal: I'm trying to make a variant of the Sentry Drone that uses Palette 25, and is 2.5 times the normal Drone's size. This variation also has 900 health as opposed to the normal 150. The Drone is not supposed to explode at close range, but simply do ram damage every 1/2 second it's close to you. However the main thing it's gonna do is drop monsters out of it down onto the ground to make things difficult for the player. I've done most of this before with the drone once. However the thing that got me stumped both last time and this time is this: for some reason, when I go under the actor DRONE and try to have it establish the Health value, it'll do one of two things depending on the way I try to set the command up. If I add the command like this: Code:
actor DRONE DRONESTRENGTH state status_attack_damage_control state checkdronenearplayer ifspritepal 25 { sizeat 80 80 strength SUPERDRONESTRENGTH } (rest of code below) I do know that sometimes you're supposed to set the value like this: Code:
actor DRONE DRONESTRENGTH state status_attack_damage_control state checkdronenearplayer ifrnd 2 fall else soundonce DRON_JETSND ifaction 0 ifspritepal 25 { sizeat 80 80 strength SUPERDRONESTRENGTH } ai AIDRONEGETE (rest of code below) Although I'll probably smack myself upon getting the answer right, I need to ask, does anyone know the proper place to put the value for setting the Super Drone's strength(so it will take damage properly, but also so other Drone still explode when near like usual)? I'm gonna try to mess with it, but I can't think of anywhere else it could go... If you want, I'll post other parts of the drone's code. I do use vars for setting the Experience it gives when slain, but that doesn't seem to be having problems. Still, I'll post if someone needs me to.
Last edited by Lord Misfit; 09-11-2006 at 08:00 PM.
|
|
09-11-2006, 08:05 PM | #42 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Erm, you didn't add any parentheses around the 'ifspritepal 25' and 'ai AIDRONEGETE' lines, therefore making the 'ai AIDRONEGETE' bit get run all the time instead of when there's no action being performed.
|
|
09-11-2006, 08:06 PM | #43 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
It looks like you are setting its ai to AIDRONEGETE constantly, which is not allowing it to blow up. This is because you didn't use { }, and so the ai command is not conditioned on ifaction 0
ifaction 0 { ifspritepal 25 {sizeat 80 80 strength SUPERDRONESTRENGTH } ai AIDRONEGETE // plus any other instructions you want it to execute once when it starts } EDIT: TX was typing his answer at the same time lol
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
|
09-11-2006, 08:09 PM | #44 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
*smacks head on desk a couple times*
I knew it. I knew it had to be me just not seeing something simple. It works. Thanks >.>; Code:
ifaction 0 { ifspritepal 25 { sizeat 80 80 strength SUPERDRONESTRENGTH } ai AIDRONEGETE } |
|
09-12-2006, 03:37 PM | #45 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
One of my pet peeves is seeing people not putting brackets on if statements, from "ifaction" to "ifwasweapon", along with just about everything else that requires brackets. Brackets make coding much easier! I'm not kidding!
|
|
09-12-2006, 04:07 PM | #46 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Got a new question(something about normal CONs that got me stumped), but it's something not vital to work on now, just for later reference.
This is mainly something for Deeperthought, but anyone can also answer: How do you actually edit the Pig Recon Cars? I know DNWMD has them randomly shooting RPGs at you, but as I can tell, aside from one or two mentions in the normal CON code, the Recon never actually appears anywhere(unless it's not under RECON and some other thing). The idea is I eventually want to get it that a RECON of a certain palette will spawn a Pigcop of the same palette, but more than likely I'll need to set a variable in the RECON code[if it exists] to do this, and I'd also like to give various RECON car palettes different attacks. Sorry, this is probably another case of me missing something simple, but you know how I seem to get sometimes... bleh. >.>; EDIT: Oh, and one more thing. Concerning the old Defense code we worked with earlier: Is there a way that I can override the red-damage palette with a different one[or none at all] if Duke takes 0 damage from an attack? I tried setting "palfrom 0 64 64 64" in the state, but it doesn't seem to actually do me any good.
Last edited by Lord Misfit; 09-12-2006 at 04:13 PM.
|
|
09-12-2006, 04:49 PM | #47 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
News Flash: Most things in the game are hard-coded. You need to use EVENT_GAME.
|
|
09-12-2006, 04:55 PM | #48 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
Certain actors, such as RECON and GREENSLIME, do not have any con code. However, you can add your own con code for them using EVENT_GAME.
In the case of the pigcops spawning from the RECON, have the PIGCOPs check to see what they were spawned by, and if it is a RECON, then set their palette to the one the RECON had.
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
|
09-12-2006, 07:33 PM | #49 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Here is the syntax:
Code:
gamevar GAMEFLAG 0 2 onevent EVENT_GAME getactor[THISACTOR].picnum GAMEFLAG switch GAMEFLAG case <picnum\DEFS.CON defined name>: <insert code here> break case RECON: <insert code here> break endswitch endevent Both events work with the above syntax, but you should have a seperate var for each. The primary difference between the two is that EVENT_GAME code processes 26 times a second (the normal for code), but the EVENT_EGS code only executes once, the very first tic that actor is running. Now, EVENT_EGS runs after an eventloadactor block, so keep that in mind if you need custom map effects. They can be used to add code to any actor, including normal CON controlled actors (like LIZTROOP), and hard-coded actors. Here are a few not mentioned already:
The other helpful thing about these is you can use these to add code to custom projectiles 9e.g. ones you make with "defineprojectile") allowing seriously cool things to be done. An example of this in H266MOD is the pipebomb explosion sequence. The early alphas used a lame ai in the EXPLOSION2 actor to spin around, but v1.5 will use an invisible projectile that leaves a trail of EXPLOSION2s and produces a sound and damage with them from the EXPLOSION2 actor. The EVENT_GAME code I use is to limit the height of them. So here is what will happen:
|
|
09-15-2006, 01:45 PM | #50 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Okay, it seems again I need to push in the right direction.
After recent success with making a custom damage/heal floor, I wanted to try to make it that when the player pushes on a certain wall, such as ATMs or Vendor Machines, that something actually happens. The idea is that later on, you can use the money you pick up to buy things from vendors, put it in ATMs or take money out, or other stuff. At the moment, I'm just trying to figure out the proper syntax to use for get/setwall. There is no real basic explaination available for it on the Wiki, so I had tried to assume that g/setwall[THISWALL].whatever would do something, but it turns it it's an invalid flag to use to even start off. In a sense, I'm a but stumped how to start it off, and how to properly use the get/setwall stuff. Sorry if this seems like a basic and stupid question. BTW, code for what I'm trying to do: This is currently set in the APLAYER code in game.con if anyone cares. Code:
getwall[PLAYERID].picnum PLAYERPRESSWALLNUM { ifvare PLAYERPRESSWALLNUM 1212 { ifpdistl 700 ifhitspace ifp palive { ifcount 26 { quote 112 } } } else ifvare PLAYERPRESSWALLNUM 1214 { ifpdistl 700 ifhitspace ifp palive { ifcount 26 { quote 93 } } } else ifvare PLAYERPRESSWALLNUM 1215 { ifpdistl 700 ifhitspace ifp palive { ifcount 26 { quote 115 } } } else ifvare PLAYERPRESSWALLNUM 1217 { ifpdistl 700 ifhitspace ifp palive { ifcount 26 { quote 115 } } } }
Last edited by Lord Misfit; 09-15-2006 at 01:48 PM.
|
|
09-15-2006, 03:06 PM | #51 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Use [THISACTOR]. Just like with getplayer, getwall (and every other struct but (this)projectile) has a special effect with THISACTOR in there. The effect is that it counts as the APLAYER sprite's sprite ID, or the cursectnum, or whatever is needed to get them to work. You may need to mess around with "getwall[THISACTOR].nextwall" a bit. TerminX should have the answer to that one, since he helped with ESample.con and it had some "nextwall" stuff in there.
|
|
09-15-2006, 09:28 PM | #52 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
There is no THISACTOR or similar in terms of getwall. You'll need to use hitscan to check which wall is in front of you and then work with that result.
|
|
09-16-2006, 12:29 AM | #53 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Well, thanks to you basically telling me to use hitscan, I got it to work[albiet it I need to refine the code for the hitwalls (such as finding a way for the events to occur only when close to the walls instead of just looking at them from any distance[ifpdistl doesn't seem to work on them though] :P)
HOWEVER, in semi good news for Deeper(because I was stupidly pestering him about this a bit at one point earlier on in PMs): I figured out how to do your enemy health display code and got my own copy working after finally figuring out how to use hitscan. It'll be nice to see enemy health now when I test later stuff. Also, I might take it a step further at some point and have it show the damage you and your enemy hit each other for via various stuff later. Again, thanks overall for the help so far guys. I'm much further along with CON coding then I ever reached a few years ago when I stopped. If I need anymore specfic help, I guess I ring you a buzz[unless there are more things you all need to tell me :P].
Last edited by Lord Misfit; 09-16-2006 at 12:33 AM.
|
|
09-16-2006, 12:38 AM | #54 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
Don't worry, I didn't feel that I was being pestered. I guess you had trouble finding the part of my code that controls the enemy health display? Not surprising, considering how badly organized it is. It's actually kind of amusing to think that people are digging through my messy code to figure out how I did stuff.
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
|
09-16-2006, 01:19 AM | #55 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Actually, I had the main display code of yours in a few times, but I never figured out how to actually hitscan until I went to the wiki earlier tonight. I then was able to do it.
|
|
09-16-2006, 06:08 AM | #56 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
In that case, it turns out that I answered the question in your PM after all, since I'm the one who typed up the wiki entry on hitscan
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
|
09-16-2006, 11:15 AM | #57 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
This post is just a bit of an update. As a kind of extension of the hitscan stuff(mostly the health readouts), I've added a system that will display the NAME of the monster/actor[including palette-specfic varients (Assault Trooper/Assault Captain)] in addition to the health value. [at the moment, I gotta work out the correct Xdisplay coordinates for each name, so they all look centered, but otherwise it works fine]
Also, boss-level enemies have user the bigger numeric fonts for their health(as opposed to normal monsters using the tiny text). Minibosses use the usual quote font, the true-boss rank monsters use the large white font, while my special ESS-rank boss monsters use the big bold-red font seen in the menus. Also, the name/health display will show at the same palette as the enemy targetted (Assault Trooper text is pal 11/22, Assault Captain is pal 21, Mini-Boss1 is pal 21, Boss1 is pal 0/3/9, etc) Also, on top of that, I got it that various other targets [like fire actors or a lot of the Atomic Edition notenemy actors] no longer display their health and show no name. I noticed this happened sometimes in DNWMD, so I figured on mine I'd make a way to get around that. However other NPCs [FEM#, ROBOTDOG2, TOUGHGAL, etc] still show a name and health value when they are targetted. I might extend this to item identification later on, but I don't know when I'll get to it if I do. Here's a few screens I dredged up of the examples I speak of, if anyone cares to observe. :P There's three more I can't put in here, display[1-3].gif, Anyways, a lot of the unlabeled numbers in the pictures are just variables shown for debugging purposes. The red number under speed is the last damage inflicted by the kick[via the attack calculation system we worked on a bit ago] The two yellow numbers below it are both the original damage and 'defended damage' from the last attack Duke was hit by(after defense is subtracted from the attack damage). The two green numbers below are the minimum then maximum range of damage the kick can do currently, barring a critical blow[which is 2x normally, 4x with Steroids]. The number to the right of the HP is the medikit amount[from 0 to 200% max health can be held]. The three numbers below HP(Health)/AP(Armor) are the true numbers for the Episode, Level and Difficulty. In later versions, monsters will have varying health levels via difficulty[ala Blood], and the overall damage Duke takes also depends on the skill[50% at Skill 1 to as much as 200% at Skill 4] The five numbers on the right are hitscan-related crap. The light red is the hitsector, blue is hitsprite, yellow is hitwall, the dark-red is the hitwall's picnum, and the white is the hitsprite's picnum. The last red thing at the bottom is for better money display in a later version. I just have it there ahead of time, since TerminX says dynquote will work with it fine in the next beta. I know I know, TMFI. Just for the more curious of you. :P |
|
09-16-2006, 04:43 PM | #58 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
Thanks for reminding me of this bug. The fix will be in the next release.
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
|
09-18-2006, 03:27 PM | #59 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Got a new dillema on my hands.
The gist of it is this: is there any good way to convert the monster melee attacks (the ones that use addphealth) into attacks that work more like the mighty foot? The reason is because addphealth ignores the player defense system, and I'd like to know if it's possible to get one working. I tried to make a test attack for the Octabrain's bite, but he can't seem to actually hit me with it. Code:
define OCTABRAINBITE 1634 defineprojectile OCTABRAINBITE PROJ_WORKSLIKE 16 defineprojectile OCTABRAINBITE PROJ_EXTRA 11 defineprojectile OCTABRAINBITE PROJ_SOUND OCTA_ATTACK2 defineprojectile OCTABRAINBITE PROJ_ISOUND OCTA_ATTACK2 defineprojectile OCTABRAINBITE PROJ_CLIPDIST 10 defineprojectile OCTABRAINBITE PROJ_RANGE 1280 |
|
09-18-2006, 03:42 PM | #60 | |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
Quote:
I don't know what else is wrong with your projectile, but make sure that it is visible while you are testing it, so you can see what it is doing. you can always make it invisible later.
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
||
09-18-2006, 04:34 PM | #61 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
You need to create a state like the one for the kick and put it at the top of the APLAYER actor. Remember to get rid of the addphealth stuff in the OCTABRAIN actor.
|
|
09-18-2006, 04:57 PM | #62 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Actually, I feel stupid now. I found a means that avoids using projectiles, gets around the addphealth, and works fine for me already since I got the working defense states up.
Code:
state octascratchenemystate ifpdistg 1280 ai AIOCTAGETENEMY else { ifspritepal 14 ifcount 20 // Octanines bite 37.5% faster than other Octabrains { resetcount sound OCTA_ATTACK2 palfrom 24 32 { setplayer[THISACTOR].i PLAYERID setvar MELEEDAMAGE 33 randvar MELEEDAMAGEVAR 15 { ifrnd 128 { addvarvar MELEEDAMAGE MELEEDAMAGEVAR } else { subvarvar MELEEDAMAGE MELEEDAMAGEVAR } } setactor[PLAYERID].htextra MELEEDAMAGE } } else ifcount 32 { resetcount sound OCTA_ATTACK2 palfrom 8 32 { setplayer[THISACTOR].i PLAYERID setvar MELEEDAMAGE 11 randvar MELEEDAMAGEVAR 5 { ifrnd 128 { addvarvar MELEEDAMAGE MELEEDAMAGEVAR } else { subvarvar MELEEDAMAGE MELEEDAMAGEVAR } } setactor[PLAYERID].htextra MELEEDAMAGE } } } ends |
|
09-18-2006, 05:02 PM | #63 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
What's with the random parentheses? Also, you used setplayer instead of getplayer.
|
|
09-18-2006, 05:09 PM | #64 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
yeah, thanks for pointing it out. The parentheses are mainly for me to quickly tell where my code would start and end. >.>
EDIT: In other news, I've developed an AIR meter for underwater. Basically, it's a near copy of Shadow Warrior's AIR Meter[same sprites, different screen placement]. I also figured out how to change a player's air supply and it might end up among one of the improvable stats Duke gets per a level up. Also, when Duke resurfaces, the air will not refill instantly, but instead will regenerate at 3x the speed he loses it underwater. When air is being still recovered, the AIR meter is transperant until it fills up, which it disappears. I might get some screen shots for it later. :P
Last edited by Lord Misfit; 09-19-2006 at 09:43 AM.
|
|
09-19-2006, 12:36 PM | #65 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
New question: Just something that's been bugging me a bit and I want to know: Is there a way to change the value your health is set to in God Mode side from the normal MAXPLAYERHEALTH? (say setting it to 1 point, or to MAXHITPOINTS instead)? I was hoping there might have been an event for it, but I didn't see one in the Wiki.
To TerminX on a side note: Will the max compile size increase in later versions? I'm not dangerously close to the 65536 bytes just yet, but I'm sure at the rate I'm adding, it won't be too horribly long. I'm sure it'd not be good to go over it right now either. |
|
09-19-2006, 12:51 PM | #66 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
You must be confused. If you think you are anywhere near that limit, you are either doing something horribly, horribly wrong or you are looking at the wrong numbers. You'd need about a megabyte of CON text in order for the compiled code to be 64KB.
|
|
09-19-2006, 01:03 PM | #67 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Well, all five of my cons are 530k when put together, so that might have to do with it. I'm at 41k compiled. I'm just saying, it seems at the rate I'm adding stuff to this, I might reach the 65k complied limit within 1-2 months.
Code:
Compiled code size: 41041/65536 bytes 2247/11264 labels, 478/1024 variables 6 event definitions, 249 defined actors (And yes, I do tend to do a lot of coding when I can. I've done work on a sourceport for Doom called EDGE, and two of the files I worked with had grown to 900k and beyond from less than 50k each over about a full year of time[though I had a huge # of custom monsters and attacks in it]) |
|
09-19-2006, 01:18 PM | #68 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Hm. I guess my generalized estimate didn't take into account that mass amounts of defined names, quotes, sounds, et cetera don't count towards the compiled code size. I suppose I'll increase it to 96KB.
|
|
09-19-2006, 07:17 PM | #69 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Ok, thanks for the consideration TerminX.
Now back to the original question at hand: the God Mode question. Between then and now I tried out the .god userdef setting, because I figured on it being my best shot. Code:
getuserdef[THISACTOR].god CHEATGOD ifvare CHEATGOD 1 { setactor[PLAYERID].extra MAXHITPOINTS } Are there any other possible ways I haven't considered, or is this hard-coded? If it is hard-coded, would it be possible for a later version of EDuke to be given the ability to alter the god mode health? |
|
09-19-2006, 07:27 PM | #70 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Why would I waste memory adding something so useless? It uses whatever you specified as the max health in USER.CON. Set the USER.CON value to the max possible health you want the player to have after leveling up to the maximum level or whatever and then artificially restrict the player's health to a lower value in-game.
|
|
09-19-2006, 07:53 PM | #71 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
Well, nevermind then. I decided to set it to 2, to punish the player for using God Mode instead.
Besides, it'd be hard if not impossible to use your idea, since all level up stat increases are random to an extent for the sake of difference in each playthrough. The player will never have the exact same Level 100 Health/Armor/etc every time they get that far(the player might have more Defense than Attack, more Armor than Health in one game, then it could in another game be the opposite). There is an innumerable range between the least amount of a stat the player can have at Lvl 100 and the most they can have of that stat. Sorry, I guess I should've mentioned this, but it didn't seem important at the time. Bleh, and of course, I've wasted both our times with this crap. Sorry about that. :\ |
|
09-19-2006, 08:12 PM | #72 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
So what? There still has to be some theoretical upper limit.
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
|
09-20-2006, 08:48 AM | #73 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
As I said before, I've set it to put health at 2 anyways. I guess I could use the hard-max of 32767 if I decide to go the other way[which I wish could go higher than that for at least monster actors, but I'm not gonna actually ask for it, since I'm sure there's a technical or memory-issue with increasing the max health limit for actors], but for now, it's set to 2. :P
Besides, I found I can at least set other stuff with this(i.e. Armor, etc), none of which I think you want me to go into right now, because I've been annoying enough for the time being. |
|
09-20-2006, 11:55 AM | #74 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
Speaking for myself, I wasn't annoyed in my last post but I honestly didn't understand why you thought that TX's suggestion wouldn't work for you. In fact, I'm kicking myself for not having thought of it myself (it seems so obvious in retrospect).
The way I did it in DNWMD was more work, because I have a low starting health and this required that I add code to the health pickups and medkit so that they would artificially raise the player's health over the defined max once the player has upgraded. Eventually I'm going to go back to DNWMD and recode a lot of stuff. Even if it doesn't effect gameplay very much, it will make me feel better to know that there isn't crappy code "under the hood".
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
|
09-21-2006, 11:15 PM | #75 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
I got a new question. However most of the work has already been done, just one specfic detail I need to know.
The gist of this next thing is that I made a kind of 'gliding' ability that allows the player to fall at reduced speed (forcing the poszv to be less than a certain amount) and prevent fall damage, or falling death. It works fine for me, but the problem I got is that I want to make it that you have to hold down a certain button[perferably the jump button] while falling to actually utilize the gliding, but be able to fall as normal if the player lets up on the button or doesn't hold the button at all. I thought about the jumping_toggle as a means to do it. However according to both the wiki and tests, if you just walk off a high ledge, pressing/holding down the jump button doesn't affect the jumping_toggle[I was gonna have it that gliding only works if it was toggled to 1, but due to the above circumstances, that won't actually work]. I also tried putting the state activation in a few events, but none of them have a constant effect[they can't be 'held down' so the glide activates for a split-second and is essentially useless]. So is there any way to get it that something will work only when a key is HELD DOWN and not just pressed? If not, thanks for at least taking the time to reply. >.>
Last edited by Lord Misfit; 09-22-2006 at 12:35 AM.
|
|
09-22-2006, 12:44 AM | #76 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
That's funny, because in my experience most events work in the opposite way, where pressing the key continues to trigger the event. In fact, one of the first problems you brought up was that ifhitspace would continue to trigger every tick when it was held down.
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
|
09-22-2006, 09:14 AM | #77 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
After looking over your reply and then the topic Lufia made, I decided on using EVENT_LOOKUP to activate gliding. However this means if I use multiplayer[probably not since I don't usually MP, but just because I don't doesn't mean others won't want to use it], it'll make the view look up even if I try to prevent it.
BTW, as far as I've seen, CROUCH, TURNAROUND, JUMP are events that do not seem to 'hold down', where USE, LOOKLEFT, LOOKRIGHT, LOOKUP and LOOKDOWN do. There are probably others, but these are the five events I noticed anyways. As for the hitspace thing: I have to admit, I had completely forgotten about the tipping problem I had back then. >.>; So for now, I'll settle with the LOOKUP[LOOKLEFT/LOOKRIGHT are already taken since LOOKLEFT toggles the display of monster health and names, and LOOKRIGHT toggles the display of the debugging variables[I know, I could techincally change these around or eliminate the debug toggle, but for now that's how I got this set up]]. And although it's probably not my place to say it, I do have to admit after looking at Lufia's topic, it would indeed be nice to have a few custom events with custom key links at some point. I know most people usually won't have five unique keys in their mod, but from my point of view, I'd rather be safe than sorry if it came down to it. Sorry, just my opinion on the subject since I got notice of it. |
|
09-22-2006, 10:25 AM | #78 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
I've been thinking about the events for a while and after reading your post I think that I have come up with a possible solution to "more" event keys although it doesn't actually give you more.
Esentially, you could set one key to be a toggle for another key through variables (or even a menu type system). It would not be pratical for all uses, but it could work well with some ideas. A good use for it could be that you want to have an alternate firing key and another key would be the toggle key to switch what the alternate firing key does. In your case, if you come up with more than two menus then you could save a key by assigning one key to activate menus and the other key to toggle through which menu it would activate if pressed. It would probably be okay to assign the LOOKUP key to the toggle key since it would not be doing a game action. That could free up an event for gliding if you wanted to make sure it didn't look up while you're gliding in a multiplayer game. |
|
09-25-2006, 01:48 AM | #79 |
Re: Questions about using vars with quotes, or displaying vars on screen in text form...
In other news, I made some new item effects: a Quad-Damage type effect[still need to make the actual item that gives it to you], and an Invulnerablity effect[item looks like the Icon of the Defender right now].
Quad Damage is basically as you'd expect it to be. EVENT_FIRE helps with timing the Quad chord. The only thing is at the moment it doesn't quad damage you do to yourself with rockets. Your screen turns a medium-strength blue when it's in effect. Invuln is the important change though. Your screen turns a medium-strength white. Fall damage is nulled. Enemy damage is nulled against you and deflected to them with no defense calculation, accompanied by a bright white flash and a beeping noise. Also, any enemy that gets close enough to touch you will explode instantly, except for the bosses. However some things like floor-damage and drown damage can pierce the invuln. Don't know what's next in line for this though. >.> I'll have to think more on it. |
|
09-25-2006, 06:40 PM | #80 | |
Re: Questions about using vars with quotes, or displaying vars on screen in text form
Quote:
GAME.CON: In event `EVENT_DISPLAYREST': GAME.CON:1259: error: expected a keyword but found `dynquote'. GAME.CON:1259: error: expected a keyword but found `180'. GAME.CON:1259: error: expected a keyword but found `tempb'. Found 0 warning(s), 3 error(s). I also thought of a small complication if it works the way you describe: Once the quote is written back to the source, it will no longer contain the "%ld". So, if you want to use it again on the same quote, you need another copy of the quote to replace the original first.
__________________
DUKE PLUS New map effects and various optional extras for Duke 3D. DUKE NUKEM: ATTRITION XP based weapon upgrades, progressive difficulty, and more. |
||
Bookmarks |
|
|