
EDuke32 Scripting "CON coding help"
#1517 Posted 06 October 2014 - 10:48 AM
#1518 Posted 06 October 2014 - 10:58 AM
Reason is I put 0 instead of 9.
I'm soo used of 0 (as weapon 10).
#1519 Posted 06 October 2014 - 11:20 AM
define KNEE_WEAPON 0 define PISTOL_WEAPON 1 define SHOTGUN_WEAPON 2 define CHAINGUN_WEAPON 3 define RPG_WEAPON 4 define HANDBOMB_WEAPON 5 define SHRINKER_WEAPON 6 define DEVISTATOR_WEAPON 7 define TRIPBOMB_WEAPON 8 define FREEZE_WEAPON 9 define HANDREMOTE_WEAPON 10 define GROW_WEAPON 11
#1520 Posted 06 October 2014 - 05:02 PM
I made this, Works.
Weapon 0 (9) does diff sound. has a short delay before fireng.
Example
gamevar WEAPON9_FIRESOUND 643 1 gamevar WEAPON9_INITIALSOUND 642 1 gamevar WEAPON9_FIREDELAY 32 1 gamevar WEAPON9_TOTALTIME 42 1
1 fire sound.
2 (charging) sound.
for the sounds
This post has been edited by Zaxtor: 06 October 2014 - 05:03 PM
#1522 Posted 06 October 2014 - 07:51 PM

TerminX, on 28 January 2012 - 09:05 AM, said:
#1525 Posted 07 October 2014 - 06:37 AM
I am currently just messing around with creating a crude sunset by cycling skyboxes and changing the visibility.
But each time I try to change a paralaxed sky. It does not work.
Confused I turned off the skybox in mapster. The code does render normally and I can see the tiles change on the now unparralaxed ceiling.
So next I tried turning the paralaxed sky off during the period I change the skybox through code.
But that either does not work. Or reverts the skybox to displaying the brown brick.
I am using the commands
setsector[SECTNUM].ceilingstat (alternating between 1 and 0)
setsector[SECTNUM].ceilingpicnum (just randomly selecting skyboxes or non skyboxed tiles.)
With SECTNUM being the sectornumber of the current actor.
Is this a bug in the code? Or am I approaching this completely wrong? I am using the latest snapshot.
This post has been edited by lycanox: 07 October 2014 - 06:42 AM
#1526 Posted 07 October 2014 - 08:08 AM
// if conditions for changing time are set { setvar TEMP 0 whilevarn TEMP NUMSECTORS // this sets up a loop that will go through all the sectors in the current level { ifvarand sector[TEMP].ceilingstat 1 // if it's a parallex sector { setsector[TEMP].ceilingpicnum *tilenumber* // change that room's ceiling texture to the number defined here setsector[TEMP].visibility 0 // just an example } addvar TEMP 1 // go up in the loop } }
That should work, although it's untested - making a single sprite do all of the work is better than multiple sprites and you can set up many different ways of configuring the sprite. Once you got it working, we can go from there to add more features + control to it.
#1527 Posted 07 October 2014 - 09:36 AM
I am starting to believe that the paralaxed sky is stored in a different game variable that gets written on map load.
As the game seems to remember the original skybox it was after the map was load.
Starting with skybox 1 and then changing to the picnum of skybox 2 would result in skybox 1 still being displayed.
Curiously this gamevar does only seem to be set on level start. And only seems to be capable of storing one skybox.
So if I were to load a map with no paralaxed sectors and force the code to turn those ceilings into paralaxed skies. It would show tile 0, the brown brick as the sky. If I however play the map after playing a space level. It would show the space skybox from that map. Or the LA one after a city level.
So i probably need a command like "set/getuserdef[TEMP].paralax_picnum"
Which sadly does not exist.
This post has been edited by lycanox: 07 October 2014 - 09:36 AM
#1528 Posted 07 October 2014 - 10:53 AM
lycanox, on 07 October 2014 - 09:36 AM, said:
As the game seems to remember the original skybox it was after the map was load.
Starting with skybox 1 and then changing to the picnum of skybox 2 would result in skybox 1 still being displayed.
That's true for Polymer.
#1529 Posted 07 October 2014 - 06:36 PM
#1530 Posted 07 October 2014 - 09:27 PM
Like we know gamevar VARNAME x x define the var to make the var you add work.
BUT.
Something like a Ifvare blocks the gamevar VARNAME x x until is set.
I wanna do a thing for mainly pre-gamevar set such as weapon stuff etc.
Example if I want an addon to a weapon it set a var so it get to the pre-gamevar and activate them.
like a weapon addon.
Example.
Let say weapon 5 is RPG.
RPG is hard coded and will shoot standard RPG projectile, but hardcoded can be "bypassed" if you add a new WEAPONx SHOOTS thing alongside other pre-gamevars in "http://wiki.eduke32.com/wiki/Pre-defined_gamevars"
Will make the RPG shoot a diff projectile, do diff sound and dmg.
ifvare WEAFIVEADDON 1 { ??????? WEAPON4_FIRESOUND 666 1 ??????? WEAPON4_SHOOTS 13662 1 }
I've tried gamevar, no working.
I searched but dunno what is the name for the "alternative to gamevar" that acts just like a gamevar but can work if is inside a ifvare thing.
like myospal works inside a ifvare.
Like 666 is to change the RPG sound.
13662 makes it shoot a diff projectile
??????? not sure what type of defining code to put that works inside the ifvare and acts exactly like a gamevar
This post has been edited by Zaxtor: 07 October 2014 - 09:32 PM
#1531 Posted 07 October 2014 - 09:39 PM
setvar WEAPON4_SHOOTS 13662
This post has been edited by Fox: 07 October 2014 - 09:40 PM
#1532 Posted 07 October 2014 - 09:55 PM
Fox, on 07 October 2014 - 09:39 PM, said:
setvar WEAPON4_SHOOTS 13662
Doesn't do anything except not causing "not game variable" error without gamevar VARNAME x x error.
I even tried few more , no avail.
PS
It just defines it that's it.
What I wanna do is like an inactive "gamevar WEAPON4_SHOOTS 13662 1"
So that gamevar only works if you set that var blocking it.
This post has been edited by Zaxtor: 07 October 2014 - 10:02 PM
#1533 Posted 07 October 2014 - 10:05 PM
ifvare WEAFIVEADDON 1 { setvar WEAPON4_FIRESOUND 666 setvar WEAPON4_SHOOTS 13662 }
#1534 Posted 07 October 2014 - 10:27 PM
Jblade, on 07 October 2014 - 10:05 PM, said:
ifvare WEAFIVEADDON 1 { setvar WEAPON4_FIRESOUND 666 setvar WEAPON4_SHOOTS 13662 }
I put inside the "aplayer" code.
Technically is not RPG I wanna change.
I used RPG as an example to reduce "spoil alerts".
Is technically a non projectile weapon.
projectile works, every thing works.
Is just the code was not.
I tested as "gamevar" and it works.
Now ill put inside the aplayer the setvar so I can make the code "blocked" until u grab the addon.
#1535 Posted 07 October 2014 - 10:31 PM
When var is set.
Weapon is totally muted. doesn't shoot anything.
Only its animation works.
Is inside the Aplayer actor.
At the beginning below its "title"
Above ifaction 0
This post has been edited by Zaxtor: 07 October 2014 - 10:32 PM
#1536 Posted 07 October 2014 - 10:35 PM
Zaxtor, on 07 October 2014 - 10:27 PM, said:
It only works with sprites defined as projectiles. You may wanna set WEAPONX_SPAWN instead.
#1537 Posted 07 October 2014 - 10:36 PM
#1538 Posted 07 October 2014 - 10:43 PM
Jblade, on 07 October 2014 - 10:36 PM, said:
defineprojectile was the first thing done.
Would be kinda awkward to make something shooting a projectile that isn't defined.
With the WEAPONX_SPAWN.
it works.
All is left is to fix it's "hitting dmg" of the instant hitting projectile since it kinda changed it a bit.
This post has been edited by Zaxtor: 07 October 2014 - 10:43 PM
#1539 Posted 07 October 2014 - 11:09 PM
Fox, on 07 October 2014 - 10:35 PM, said:
Fox, why did you have to tell him that? Now he has something that he is satisfied with even though it is totally fucked LOL.
#1540 Posted 12 October 2014 - 04:49 PM
#1543 Posted 12 October 2014 - 06:31 PM
#1544 Posted 16 October 2014 - 04:55 PM
Is there such things as a way to "Revive" that in the newest Eduke32?
Here is a clip (scenes from Oblivion) using weird palfrom.
Is an older Eduke engine.
Part 1 of the vid (Ghost mothership's core)
Core { palfrom 77 55 95 63 } from being hit, makes this weird red-like flash
Part 2 is more complex, it's multi sprites making the flash.
Part 3 of the vid (evil mask's projectile)
necrotizer "{ palfrom 103 83 74 125 }" for this weird Xray flash like (in older Eduke)
While in modern Eduke just does a bright white flash lasting 2 sec before it starts to decay.
if you put negative value in the intensity rather is -1 or -63 it will make a flash lasting several seconds before it slowly decays.
This post has been edited by Zaxtor: 16 October 2014 - 04:57 PM
#1545 Posted 25 October 2014 - 11:18 PM
I'm exploring rotate sprite.
Cus when you display something it doesn't go above stat bar.
Rather is with myospal or rotatesprite.
How do we make the object you wanna display go (above) the stat bar?
Like flashes with palfrom goes above stat bar.