EDuke32 Scripting "CON coding help"
#481 Posted 11 February 2010 - 01:39 PM
#482 Posted 11 February 2010 - 08:59 PM
Is that meant to trigger the episode ending video and return you to the main menu?
I just tried this in a vanilla game, and threw the line right under the APLAYER and it just mutes all sound and certain things don't work. But it doesn't play the ending video and return me to the main menu like I was hoping to.
EDIT: I see that it actually works if you trigger the end of the level, so I can work with that.
This post has been edited by The Commander: 11 February 2010 - 09:12 PM
#483 Posted 11 February 2010 - 09:20 PM
#484 Posted 11 February 2010 - 09:27 PM
setplayer[THISACTOR].gm 8 to trigger the end of the level and endofgame to trigger that animation.
EDIT: I also noticed that it is impossible to get a lower time in the stats of 00.00.03
This post has been edited by The Commander: 11 February 2010 - 09:28 PM
#485 Posted 13 February 2010 - 02:10 PM
DeeperThought, on May 19 2009, 07:28 AM, said:
A Number One, on May 19 2009, 07:41 AM, said:
Ok, Where do I change the TOILETWATER value? I take it that game.con is no longer being used? If I need to change it in duke3d.grp, I'm not real sure how to go about that. Can somebody point me in the right direction?
Thanks for any help.
#486 Posted 13 February 2010 - 02:16 PM
action TOILETWATERFRAMES 0 4 1 1 1 actor TOILETWATER 0 TOILETWATERFRAMES ifpdistl 8192 { soundonce WATER_GURGLE ifspawnedby TOILET sizeto 34 34 else { ifspawnedby WATERFOUNTAINBROKE sizeto 6 15 else ifspawnedby TOILETWATER nullop else sizeto 24 32 } ifp palive ifpdistl RETRIEVEDISTANCE ifp pfacing ifactioncount 32 ifphealthl MAXWATERFOUNTAINHEALTH ifhitspace ifcansee { ifvare mtype 0 { setvar mtype 1 sound REFRESHING addphealth 5 } addphealth 1 globalsound DUKE_DRINKING resetactioncount } } enda
Where it says "addphealth" you can change the number after it to any value you want. The first instance where it gives 5 health is for the first time you drink the water.
#487 Posted 19 February 2010 - 04:37 AM
@Commander : I downloaded your Red Alert mod and tried it. I found it quite hard : no health display and enemies can kill you in 1-2 shots.
#488 Posted 19 February 2010 - 07:24 AM
williamjcm, on Feb 19 2010, 04:37 AM, said:
Maybe it could be simpler than what I did for the MP5 in Duke Plus, but it's still going to be rather complicated. If your weapon has a true clip (not the shitty hardcoded clip system where an empty "clip" is defined as the ammo amount being divisible by the clip size), then you have to override the game's normal weapon handling to implement it. It's complicated enough that I'm not even going to try to list all the different things you have to do.
#489 Posted 19 February 2010 - 10:07 AM
williamjcm, on Feb 20 2010, 01:37 AM, said:
There is a health display you must have tried playing the maps in USER MAPS or something which does not work. You have to select episode one aka ALLIES
If you find it too hard, play it on easy. The skill levels do work.
If you were trying it on easy then try it on hard to see the difference.
This post has been edited by The Commander: 19 February 2010 - 10:14 AM
#490 Posted 21 February 2010 - 10:14 AM
The Commander, on Feb 19 2010, 03:07 PM, said:
If you find it too hard, play it on easy. The skill levels do work.
If you were trying it on easy then try it on hard to see the difference.
This post has been edited by Fox: 21 February 2010 - 10:16 AM
#491 Posted 21 February 2010 - 10:39 AM
The Commander, on Feb 19 2010, 07:07 PM, said:
If you find it too hard, play it on easy. The skill levels do work.
If you were trying it on easy then try it on hard to see the difference.
I selected the ALLIES episode and the first enemy killed me in one hit.
#492 Posted 21 February 2010 - 07:29 PM
Fox, on Feb 22 2010, 07:14 AM, said:
Did you press the "USE" button default "E" like it said at the bottom of the briefing screen.
If so, it maybe possible that you didn't press "YES" when you first installed the mod and that .CFG pop up box came up as noted in the readme.
Although I am not sure how that would have broken the bind for the use key.
williamjcm, on Feb 22 2010, 07:39 AM, said:
Do you always stand still when attacking enemies?
Try ducking as well to avoid fire, just keep moving.
EDIT: I seem to talk more about this mod in other threads than the one designed for it.
This post has been edited by The Commander: 21 February 2010 - 07:32 PM
#493 Posted 04 March 2010 - 01:18 PM
For example, I have a lamp that will spawn an SE 49. Although the lamp itself is already bright, and it will always look different ingame because it always will glow beyond the normal sprite.
#494 Posted 08 March 2010 - 01:16 PM
#495 Posted 08 March 2010 - 02:58 PM
"If a damaging floor texture (except PURPLELAVA) is used under a player's inital start position, that player will start weaponless (this only works once, subsequent spawns will not be affected)." - Infosuit
This post has been edited by Fox: 08 March 2010 - 03:00 PM
#499 Posted 09 March 2010 - 10:40 PM
setvar I 0 whilevarvarn I NUMWALLS { setvarvar A I getwall[I].point2 B setvarvar K I whilevarvarn A B { addvar K 1 getwall[K].point2 B }
The whilevarvarn A B loop assumes that if you keep incrementing K (where K is some arbitrary wall number), then the point 2 of K will eventually loop back around and be equal to K's starting value (which is saved in A). This is true in every map I have encountered except for this one. Does that mean that the map is corrupt, or what? And how would I go about fixing the code? I can't just make it bail out because it has already swapped a lot of walls by the time it it goes infinite and the result of bailing would be a bizarre corrupted map.
EDIT: Here's what I did for now --
setvar I 0 whilevarvarn I NUMWALLS { setvarvar A I getwall[I].point2 B setvarvar K I whilevarvarn A B { addvar K 1 ifvarvare K NUMWALLS setvarvar B A else getwall[K].point2 B } ifvarvarn K NUMWALLS { setvarvar A K setvarvar J I setvarvar L K subvarvar L J divvar L 2 addvar J 1 whilevarn L 0 { state swapwall setarray SWAPWALLS[J] K setarray SWAPWALLS[K] J addvar J 1 addvar K -1 addvar L -1 } setvarvar J I whilevarvarn I A { setvarvar K I addvar K 1 getwall[J].x B getwall[J].y C getwall[K].x D getwall[K].y E setwall[J].x D setwall[J].y E setwall[K].x B setwall[K].y C addvar I 1 } } addvar I 1 }
If on some I, K reaches an invalid wall number, it stops the loop and does not proceed with the wall swap for that I. However, it proceeds with the next I. So far it seems to work ok.
This post has been edited by DeeperThought: 09 March 2010 - 11:07 PM
#500 Posted 09 March 2010 - 11:33 PM
#502 Posted 12 March 2010 - 06:25 AM
This post has been edited by M210: 13 March 2010 - 03:09 PM
#503 Posted 14 March 2010 - 04:44 AM
It's probably not possible so I might have to drop this idea or make some kind of "fake walk" for the player, I just thought it would be a neat gimmick. Here is a part of the code I am using;
onevent EVENT_TURNLEFT setvar angle 512 setplayer[THISACTOR].ang 1024 // Somewhere here I would want it to cause the player to walk forward whilst this event was going on. endevent
#504 Posted 14 March 2010 - 06:55 AM
Quote
At random times, I get this notification on console. Why would this ever happen ? (The #-1 sound definition thing)
#505 Posted 14 March 2010 - 07:43 AM
High Treason, on Mar 14 2010, 01:44 PM, said:
No, since events are just certain points in the game code where the EVENT_SOMETHING blocks get executed, and AFAIK there's no such command as "throw event".
However, couldn't you just duplicate the event code in a state and call that? There's probably some care to be taken with respect to variable bindings (per-player/per-actor), this always confuses the hell out of me .
#506 Posted 14 March 2010 - 10:05 AM
DeeperThought, on Mar 10 2010, 03:40 AM, said:
setvar I 0 whilevarvarn I NUMWALLS { setvarvar A I getwall[I].point2 B setvarvar K I whilevarvarn A B { addvar K 1 getwall[K].point2 B }
The whilevarvarn A B loop assumes that if you keep incrementing K (where K is some arbitrary wall number), then the point 2 of K will eventually loop back around and be equal to K's starting value (which is saved in A). This is true in every map I have encountered except for this one. Does that mean that the map is corrupt, or what? And how would I go about fixing the code? I can't just make it bail out because it has already swapped a lot of walls by the time it it goes infinite and the result of bailing would be a bizarre corrupted map.
EDIT: Here's what I did for now --
(...)
If on some I, K reaches an invalid wall number, it stops the loop and does not proceed with the wall swap for that I. However, it proceeds with the next I. So far it seems to work ok.
If I get it, all this massive code involving "point2" is to get all walls from a specific sector?
This post has been edited by Fox: 14 March 2010 - 10:11 AM
#507 Posted 22 March 2010 - 01:14 AM
I tried to used movesprite-command for inertia of actors, like it
getactor[THISACTOR].htextra htextra ifvarg htextra 0 setvarvar k_damage htextra getactor[THISACTOR].htang a cos x a sin y a getactor[THISACTOR].htg_t 0 b // actor`s count - deacceleration mulvar b 8 setvarvar tmp k_damage // damage iffloordistl 10 // deaccelerate on ground subvarvar tmp b ifvarl tmp 0 setvar tmp 0 // clamping multiplier mulvarvar x tmp // roll force = damage - deacceleration mulvarvar y tmp shiftvarr x 12 shiftvarr y 12 setvar z 0 ifwasweapon RADIUSEXPLOSION // Additional up velosity from explossion { divvar x 3 divvar y 3 setvar z -100 subvarvar tmp b mulvarvar z tmp } movesprite THISACTOR x y z CLIPMASK0 RETURN
But it had unsynchronization and had many bugs in multiplayer. Single game works fine.
This post has been edited by M210: 22 March 2010 - 01:15 AM
#508 Posted 24 March 2010 - 07:45 PM
I had issues with trying to move actors to where I wanted them to go after they had died and reset in MP till I made it as a state in a event.
#509 Posted 24 March 2010 - 09:12 PM
The Commander, on Mar 24 2010, 08:45 PM, said:
I had issues with trying to move actors to where I wanted them to go after they had died and reset in MP till I made it as a state in a event.
The code should be a state or part of a state that is called by an actor when its htextra is > 0 or k_damage > 0 (I'm guessing that k_damage can be > 0 for a few tics after the actor has been hit, and there is additional code somewhere that is reducing k_damage over time)
#510 Posted 24 March 2010 - 11:15 PM
I'll trying test it again in multiplayer. May be I'll find the problem at my code.
And second question: I tried to use htbposx to player. Why this member repeats coordinates of the player?
I think it is need for make rocket-jump