
EDuke32 Scripting "CON coding help"
#439 Posted 29 December 2009 - 03:01 PM
#440 Posted 29 December 2009 - 07:26 PM
Milo, on Dec 29 2009, 03:01 PM, said:
weapons are just about the only thing i've learned at this point. i mite help aboul to you. im attemping to make a goldeneye style reload. a simple, gun drops off screen (sounds FXs) gun come back on screen...
for the most part im begining to realise the math behind the game is alot like N64 games. the Skycar is only a few more codes away from something like Starfox 64 in all range mode.
nintendo did some really well thought out programing for there day on N64... look into it, you'll see. what thay where working with and what thay did... its down right amazing insperation to a newbie like me. even, though i dont think i'll get that good at it.
#441 Posted 29 December 2009 - 10:27 PM
insane_metalhead, on Dec 6 2009, 01:06 PM, said:
Here is a screenshot to make my question more clear.
Is it possble to delete/change it with con coding and replace/hange it with one muzzleflash?
Thanks in advance guys.
Simple, all you have to do is make the muzzle flash a null tile. Then you can add your muzzle flash onto the shooting frames of whatever weapon you want, like the pistol art. It's what was done before all this new fancy confangled coding we got now.

#442 Posted 31 December 2009 - 11:00 AM
NerdZilla, on Dec 30 2009, 03:26 AM, said:
for the most part im begining to realise the math behind the game is alot like N64 games. the Skycar is only a few more codes away from something like Starfox 64 in all range mode.
nintendo did some really well thought out programing for there day on N64... look into it, you'll see. what thay where working with and what thay did... its down right amazing insperation to a newbie like me. even, though i dont think i'll get that good at it.
Any help at all would be appreciated!
#443 Posted 03 January 2010 - 04:40 AM
gamevar lo_tag 0 2 gamevar MONSTER_TILE 0 2 gamevar COUNTDOWN 0 2 useractor notenemy INVASION getactor[THISACTOR].lotag lo_tag ifvare lo_tag 0 break else getactor[THISACTOR].shade COUNTDOWN getactor[THISACTOR].hitag MONSTER_TILE espawnvar MONSTER_TILE subvar COUNTDOWN 1 ifvare COUNTDOWN 0 break killit else return enda
As you see,i really suck,whatever i try,this code spawn one guy,or spawn without stop...
#444 Posted 03 January 2010 - 04:50 AM

Also different from your code, I've added a bit of delay between the enemy spawn time. You can modify it by changing ifcount's value. I changed the places of getactor stuff too, as you don't need them updated every tic. I also suggest you have a cstat 32768 in your actor code after finishing it, as you wouldn't want that actor to be seen in the game.
gamevar lo_tag 0 2 gamevar MONSTER_TILE 0 2 gamevar COUNTDOWN 0 2 eventloadactor INVASION getactor[THISACTOR].shade COUNTDOWN getactor[THISACTOR].hitag MONSTER_TILE getactor[THISACTOR].lotag lo_tag // cstat 32768 enda useractor notenemy INVASION ifvare lo_tag 0 killit else { ifcount 8 ifvarn COUNTDOWN 0 // You can add a delay for the spawn interval. For now I used ifcount. { espawnvar MONSTER_TILE subvar COUNTDOWN 1 resetcount } else killit } enda
This post has been edited by XThX2: 03 January 2010 - 04:55 AM
#445 Posted 03 January 2010 - 07:46 AM

Why you have moved the getactor lines into a eventloadactor?
I don't understand the interest of eventloadactor here :s...assuming that this code is for monster and maybe weapon,(but i think for weapon i would prefer using respawn) it is really usefull?
edit : hum,your code don't spawn anything,after trying,i've got this,that work =) thanks
gamevar lo_tag 0 2 gamevar MONSTER_TILE 0 2 gamevar COUNTDOWN 0 2 eventloadactor INVASION getactor[THISACTOR].shade COUNTDOWN getactor[THISACTOR].hitag MONSTER_TILE getactor[THISACTOR].lotag lo_tag enda useractor notenemy INVASION ifvare lo_tag 0 break else { ifvarn COUNTDOWN 0 { espawnvar MONSTER_TILE subvar COUNTDOWN 1 } else break } enda
This post has been edited by Kenny mckormick: 03 January 2010 - 08:23 AM
#446 Posted 03 January 2010 - 09:16 AM
gamevar lo_tag 0 2 gamevar MONSTER_TILE 0 2 gamevar COUNTDOWN 0 2 eventloadactor INVASION getactor[THISACTOR].shade COUNTDOWN getactor[THISACTOR].hitag MONSTER_TILE getactor[THISACTOR].lotag lo_tag // cstat 32768 enda useractor notenemy INVASION ifvare lo_tag 0 killit else { ifcount 8 { ifvarn COUNTDOWN 0 { espawnvar MONSTER_TILE subvar COUNTDOWN 1 resetcount } else killit } } enda
This post has been edited by XThX2: 03 January 2010 - 09:17 AM
#447 Posted 03 January 2010 - 11:09 AM
But i think i don't understand how work Event ><
i do this
gamevar TEMP 0 2 onevent EVENT_KILLIT setactor[THISACTOR].picnum TEMP ifvare TEMP 1680 { spawn 52 } else break endevent
So,when something die,like a liztroop,this event should check if it is a LIZTROOP (1680) and if yes,spawn a medic...
But...no that do nothing...
#448 Posted 03 January 2010 - 01:50 PM
#449 Posted 03 January 2010 - 02:22 PM

#450 Posted 04 January 2010 - 05:06 PM
#451 Posted 04 January 2010 - 06:43 PM
High Treason, on Jan 5 2010, 02:06 PM, said:
http://forums.duke4....?showtopic=1560
#452 Posted 28 January 2010 - 05:02 AM
It's a good thing I'm trying to start this idea out simple since it's already kicking my butt.
Here's the code. It's beneath the APLAYER line, and the code itself isn't all there. I've only included what I'm trying to alter.
ifvare AIM 1 // if the player's aiming, calculate the cos, sin and z angles, then do a hitscan { setvarvar mysector temp getplayer[THISACTOR].ang angvar getplayer[THISACTOR].horiz zdist subvar zdist 100 mulvar zdist -2048 cos mycos angvar sin mysin angvar // horiz at 0 z angle is 100; pos for up, neg for down hitscan x y z mysector mycos mysin zdist hitsector hitwall hitsprite hitx hity hitz clipmask ifvarn hitsprite -1 { quote 1 }
I'm assuming that the hitsprite variable serves a purpose similar to findnearactor's return variable. In that case, it should print the quote if the hitscan's over a sprite. It doesn't. If i change the line to where it prints the quote if hitsprite EQUALS -1, it plays all the time, but the scantrail is hitting tons of sprites. Is this a clipping issue, or am I just royally screwing something up?
#453 Posted 28 January 2010 - 06:29 AM
Clipmask
But, I guess you need CLIPMASK0, it clips to blockable sprites and walls. (I think you want it to auto aim to enemies, so they automatically should have blockable sprite cstat)
#454 Posted 28 January 2010 - 06:43 AM
XThX2, on Jan 28 2010, 07:29 AM, said:
Clipmask
But, I guess you need CLIPMASK0, it clips to blockable sprites and walls. (I think you want it to auto aim to enemies, so they automatically should have blockable sprite cstat)
The clipmask variable is set to 4294901808, per the wiki's suggestion (and what DT originally had it set to).
#455 Posted 28 January 2010 - 06:53 AM

EDIT : I have the same code for a similar purpose, and here's what I do which did show the quote :
getplayer[THISACTOR].posx posx getplayer[THISACTOR].posy posy getplayer[THISACTOR].posz posz getplayer[THISACTOR].cursectnum mysectplayer getplayer[THISACTOR].ang angvar2 getplayer[THISACTOR].horiz horiz subvar horiz 100 mulvar horiz -2048 cos cosine angvar2 sin sine angvar2 hitscan posx posy posz mysectplayer cosine sine horiz hitsector2 hitwall2 hitsprite2 hitx2 hity2 hitz2 4294901808
Could it be because you have been using the variables you have already used above in some other hitscan call that APLAYER does?
This post has been edited by XThX2: 28 January 2010 - 06:56 AM
#456 Posted 28 January 2010 - 06:57 AM
#457 Posted 30 January 2010 - 04:16 AM
If it is possible, I would like a code that creates a flashlight activated by EVENT_TURNAROUND.
PM me the code since I don't have enough time to read the forums because of high scool.
#458 Posted 30 January 2010 - 05:25 AM
Also I 've sent you a p.m.
This post has been edited by supergoofy: 30 January 2010 - 05:28 AM
#459 Posted 30 January 2010 - 05:54 AM
supergoofy, on Jan 31 2010, 02:25 AM, said:
Also I 've sent you a p.m.
But don't use it with the latest versions of EDuke32 as the flashlight will be broken due to the changes made to polymer lights and the way that Fusion Redux uses the light.
#460 Posted 30 January 2010 - 05:57 AM
The Commander, on Jan 30 2010, 02:54 PM, said:
And if I deactivate Polymer ?
#461 Posted 30 January 2010 - 06:00 AM
williamjcm, on Jan 31 2010, 02:57 AM, said:

Then you wouldn't have a flashlight... *sigh*
This post has been edited by The Commander: 30 January 2010 - 06:00 AM
#462 Posted 30 January 2010 - 06:50 AM
#463 Posted 31 January 2010 - 02:02 PM
#464 Posted 01 February 2010 - 06:43 AM
supergoofy, on Jan 30 2010, 03:50 PM, said:
The flashlight don't work with the bundled Eduke32.
Is this possible to make the flashlight like the Recon Car headlights : a directional Polymer light "welded" to the player.
#465 Posted 01 February 2010 - 06:55 AM
The flashlight makes use of polymer renderer. At least I have tested it with eduke32 r1594 and it still works.
Look here for new eduke32 builds:
http://dukeworld.duk...ke32/synthesis/
This post has been edited by supergoofy: 01 February 2010 - 07:02 AM
#466 Posted 04 February 2010 - 03:50 PM
case CHAINGUNNER getactorvar[THISACTOR].mo_active temp ifvarn temp 1 { ifaction AENEMYSTAND nullop else action AENEMYSTAND state enemystand } break
That case is in EVENT_GAME, under a picnum switch. Also, that "state enemystand" only has these lines in it at the moment, to disable another issue about the "seeing" thing I described above :
state enemystand getactor[THISACTOR].ang temp_ang ifvarvarn temp_ang standang { setvarvar temp_ang standang setactor[THISACTOR].ang temp_ang } ends
This post has been edited by XThX2: 04 February 2010 - 03:53 PM
#467 Posted 04 February 2010 - 04:22 PM
XThX2, on Feb 4 2010, 03:50 PM, said:
You could find out easily enough by using changespritestat THISACTOR 1 on the monster in its EVENT_GAME code. EDIT: When you do that, also try setting its httimetosleep to 780 (or some other good number) so it doesn't immediately fall asleep again.
This post has been edited by DeeperThought: 04 February 2010 - 04:24 PM
#468 Posted 04 February 2010 - 04:39 PM
This post has been edited by XThX2: 04 February 2010 - 04:39 PM