
EDuke32 Scripting "CON coding help"
#1909 Posted 15 December 2016 - 08:37 PM
#1910 Posted 15 December 2016 - 08:46 PM
I put the setsprite THISSPRITE and the xyz coordinates etc.
#1911 Posted 27 December 2016 - 12:17 PM
I havent found enough information about that.
1- "status and crosshair" page (available from "display options" menu) ;
2- "select skill" when loading a new game ; I know this is port 110 but how to skip it ? manipulating the RETURN would lead back to a menu again. Maybe I'm not reasoning in the right way...??
As a subsidiary question : I managed to skip "cheat" menu - and other unused ones - but when I click on them, the main menu is "reloaded" and thus "slides".
I don't want to see that ; I would have liked nothing happens when an user select an "unavailable" page.
This post has been edited by David B.: 30 December 2016 - 09:12 AM
#1912 Posted 01 January 2017 - 08:37 AM
I wanted to try some things in scripting and I have a small problem :
I have made a switch to operate a door and I want this switch to get back to "released" state after a delay while in "pressed" state you can't activate it.
It works nearly as I want but sometimes the switch is reactivated nearly immediately (the door open a bit and close afterwards - and vice versa).
Any help is welcome,
Bye,
DotK3D
here the code :
// Custom switches define NEWSWITCH 3585 action NEWSWITCHRELEASE 0 1 1 1 1 action NEWSWITCHPRESS 1 1 1 1 1 eventloadactor NEWSWITCH gamevar activatorLotag 0 2 getactor[THISACTOR].lotag activatorLotag enda useractor notenemy NEWSWITCH 0 NEWSWITCHRELEASE ifp pfacing ifpdistl 1280 ifhitspace ifaction NEWSWITCHRELEASE { action NEWSWITCHPRESS soundonce SWITCH_ON operateactivators activatorLotag 0 break } ifaction NEWSWITCHPRESS ifcount 64 { action NEWSWITCHRELEASE resetcount break } enda
and the test map with art file and game.con
Attached File(s)
-
testswitch.zip (23.42K)
Number of downloads: 559
This post has been edited by DotK3D: 01 January 2017 - 08:38 AM
#1913 Posted 01 January 2017 - 09:02 AM
#1914 Posted 01 January 2017 - 09:35 AM
It seem to works. I have added resetcount just after soundonce SWITCH_ON
Thanks a lot,
DotK3D
PS : I have read somewhere that a EVENT_DAMAGEWALL was planned, to do custom breakable screens If I have understand correctly, is it available ?
This post has been edited by DotK3D: 01 January 2017 - 09:37 AM
#1917 Posted 13 January 2017 - 11:29 AM
define _BPRESS #### defineprojectile _BPRESS PROJ_WORKSLIKE 1 // or 16 defineprojectile _BPRESS PROJ_EXTRA 1 // or 0 defineprojectile _BPRESS PROJ_XREPEAT 4 defineprojectile _BPRESS PROJ_XREPEAT 4 defineprojectile _BPRESS PROJ_RANGE 128 onevent EVENT_KILLIT switch sprite[THISACTOR].picnum ... case FIRELASER case PLASMA_PROJ case ... shoot _BPRESS break endswitch endevent
I tried various combinations of size, damage, no_aim flag, zshoot at 0, different range...
Is something wrong/odd in the projectile declaration, or is the whole idea wrong and there are other ways to do that ?
// edit
Also, i would know the description of the PROJECTILE_REALCLIPDIST, _ACCURATE and _NOSETOWNERSHADE flags, not yet on wiki
This post has been edited by RichardStorm: 13 January 2017 - 11:42 AM
#1918 Posted 13 January 2017 - 12:00 PM
ACCURATE: Bullet-type projectile doesn't spread.
NOSETOWNERSHADE: Shooting actor won't glow when firing the projectile.
This post has been edited by Fox: 13 January 2017 - 12:01 PM
#1919 Posted 30 January 2017 - 04:15 PM
For starters, what are the min/max values for the angoff command? It is not stated in the Wiki. Second, am I going about it all wrong?
Editing the model itself is a last resort because of it being an md3 and not something with a skeleton. I would have to manually spin all the frames by 90 degrees to keep it intact.
This post has been edited by Mark.: 30 January 2017 - 04:20 PM
#1920 Posted 30 January 2017 - 04:59 PM
#1921 Posted 31 January 2017 - 09:06 PM
#1922 Posted 01 February 2017 - 04:13 AM
If I knew how, I would add that info to the wiki.
This post has been edited by Mark.: 01 February 2017 - 04:42 AM
#1923 Posted 02 February 2017 - 07:57 PM
This post has been edited by Gambini: 02 February 2017 - 08:26 PM
#1924 Posted 02 February 2017 - 09:10 PM
define JETSKI 5440 define JETSKISHOOT 5441 define JETSKI_DRIVER 5446 spritenvg JETSKI spritenvg JETSKI_DRIVER spriteshadow JETSKI //JETSKI define JETSKISTRENGTH 150 action JETSKISTAND 0 1 1 action JETSKIRUN 0 1 1 action JETSKISHOOT 0 2 1 4 action JETSKI_DRIVERSTAND 0 1 5 move JETSKIRUNVEL 150 move JETSKISTOP ai AIJETSKIGETENEMY JETSKIRUN JETSKIRUNVEL seekplayer ai AIJETSKISHOOTENEMY JETSKIRUN JETSKIRUNVEL faceplayer useractor notenemy JETSKI_DRIVER 0 ifvarn target -1 { ifvare actorvar[target].peractor1 -1 killit sizeat 40 40 getactor[target].z z action JETSKI_DRIVERSTAND cstat 0 setsprite THISACTOR sprite[target].x sprite[target].y z setangle THISACTOR [target].ang } enda useractor enemy JETSKI JETSKISTRENGTH fall ifaction 0 { fall sizeat 58 58 action JETSKIRUN cstat 257 espawn JETSKI_DRIVER setactorvar[RETURN].target THISACTOR setvarvar peractor1 RETURN } ifmove 0 move JETSKIRUNVEL faceplayer enda
This post has been edited by Gambini: 02 February 2017 - 09:11 PM
#1925 Posted 02 February 2017 - 09:24 PM
ifvarn target -1
{
ifvare actorvar[target].peractor1 -1 killit
sizeat 40 40
getactor[target].z z
action JETSKI_DRIVERSTAND
cstat 0
setsprite THISACTOR sprite[target].x sprite[target].y z
setactor[THISACTOR].ang sprite[target].ang
}
enda
#1926 Posted 02 February 2017 - 09:28 PM
#1927 Posted 02 February 2017 - 10:11 PM
Mblackwell, on 02 February 2017 - 09:28 PM, said:
He copied the code from a different actor where it made sense to have that line. I think it was code I wrote that had an enemy spawning a force field or something similar. There were other parts to it which didn't get copied. I left it in my edit because it wasn't related to the angle issue and it could become relevant later if more code is added.
#1928 Posted 03 February 2017 - 05:04 PM
Yes I based most of this by looking at code of actors that behaved similar to what i wanted. The driver (or attached sprite) is the tentacles code of the EDF troopers, i removed the pal specific lines but didnĀ“t touch that ifvare actorvar[target].peractor1 -1 killit because i dont have a clue of what it is.
#1929 Posted 17 February 2017 - 07:38 PM
#1930 Posted 17 February 2017 - 09:10 PM
Mark., on 17 February 2017 - 07:38 PM, said:
http://wiki.eduke32....i/WEAPONx_FLAGS
orvar 256 on the weapon#_flags corresponding to the weapon
#1931 Posted 18 February 2017 - 04:09 AM
// NO GLOBAL FLASH WHEN FIRING PISTOL SHOTGUN CHAINGUN
onevent EVENT_RESETWEAPONS
setvarvar gs WEAPON1_FLAGS
setvarvar gs WEAPON2_FLAGS
setvarvar gs WEAPON3_FLAGS
orvar gs 256
setvarvar WEAPON1_FLAGS gs
setvarvar WEAPON2_FLAGS gs
setvarvar WEAPON3_FLAGS gs
endevent
EDIT: CODE PRODUCED A GLITCH. DO NOT USE AS-IS
This post has been edited by Mark.: 18 February 2017 - 08:25 AM
#1932 Posted 18 February 2017 - 06:31 AM
http://wiki.eduke32.com/wiki/Gs
#1933 Posted 18 February 2017 - 06:45 AM
Mark., on 18 February 2017 - 04:09 AM, said:
// NO GLOBAL FLASH WHEN FIRING PISTOL SHOTGUN CHAINGUN
onevent EVENT_RESETWEAPONS
setvarvar gs WEAPON1_FLAGS
setvarvar gs WEAPON2_FLAGS
setvarvar gs WEAPON3_FLAGS
The var can only store one value at a time, so it's equal to WEAPON3_FLAGS as of that last line...
#1934 Posted 18 February 2017 - 07:57 AM
EDIT: It works as intended removing the flash but it messed up the firing making those 3 weapons rapid fire like the chaingun. I'll have to also check to see if it affected Graveyard in the same way. Nobody ever reported the issue.... No rapid firing pistol or shotgun in Graveyard but I did not have the chaingun in it's noflash con. If I remove the noflash for weapon3, the chaingun, firing sequence goes back to normal for the pistol and shotgun while still keeping the noflash for those 2.
So I guess it will noflash for just those 2. I can live with that if no other glitches show up.
This post has been edited by Mark.: 18 February 2017 - 08:28 AM
#1935 Posted 18 February 2017 - 09:46 AM
I suppose it's the right thread to post that question, so is there any way to control an animated 3d model with the 'use' key ?
What I mean is a 3d model which starts its animation forward or backward each time the player presses the "use" key when looking at it : for example an animated switch, a valve wheel or a door.
Does anyone think it's possible - and possibly knows the way one could do that ?
#1936 Posted 18 February 2017 - 12:40 PM
There are other ways including con coding with the "ifhitspace" command which detects when the use key is pressed. But the above does not require con code. Just def'ing in the new model to replace the old.
This post has been edited by Mark.: 18 February 2017 - 12:47 PM
#1937 Posted 18 February 2017 - 12:56 PM
Mark., on 18 February 2017 - 07:57 AM, said:
Yes, for the reason I pointed out in my post immediately above yours. You used the chaingun value to set all 3 weapons.