EDuke32 Scripting "CON coding help"
#91 Posted 14 July 2009 - 07:27 AM
#92 Posted 14 July 2009 - 07:38 AM
#93 Posted 14 July 2009 - 08:05 AM
This determines which tiles are displayed in the HUD when the weapon is used. It would be more aptly named "LOOKSLIKE" than "WORKSLIKE". Set this to 1 and the weapon will display the pistol art, 2 for shotgun, etc. It is completely useless if you are using your own HUD code.
#94 Posted 14 July 2009 - 08:12 AM
#95 Posted 14 July 2009 - 08:17 AM
Spiker, on Jul 14 2009, 09:12 AM, said:
Maybe he also set WEAPON2_SHOOTS KNEE? Anyway, if the information is wrong someone can fix or delete it.
#96 Posted 14 July 2009 - 08:42 AM
When you begin coding you don't really care what this or other command do or mean in fact you shouldn't even know it. Most tutorials for other programs are constructed in the way that you are introduced to every issue by a series of exercises. For example there could be a tutorial "How to code a custom weapon" and it would contain step by step instructions and explanations what to do as it is in other tutorials like layers in Gimp or rigging and animation in Blender:P.
Of course you won't know everything after completing that tutorial but it would give you more understanding of the code and after some more exercises you will be able to "mix" the code from various exercises and to modify it. There is a perfect tutorial for mapping in build and it's very easy to understand but after reading examples of con coding like making duke eat something, which is also quite easy I still have no idea how to code something more serious and I'm just left with a bunch of commands I don't understand and don't know how to use:P
Sorry if you think I'm pathetic but somehow I can learn from other tutorials with success while here there are just few very simple examples which aren't followed by anything more serious so I'm still stuck in the black hole.
#97 Posted 14 July 2009 - 09:04 AM
Spiker, on Jul 14 2009, 09:42 AM, said:
When you begin coding you don't really care what this or other command do or mean in fact you shouldn't even know it. Most tutorials for other programs are constructed in the way that you are introduced to every issue by a series of exercises. For example there could be a tutorial "How to code a custom weapon" and it would contain step by step instructions and explanations what to do as it is in other tutorials like layers in Gimp or rigging and animation in Blender:P.
Of course you won't know everything after completing that tutorial but it would give you more understanding of the code and after some more exercises you will be able to "mix" the code from various exercises and to modify it. There is a perfect tutorial for mapping in build and it's very easy to understand but after reading examples of con coding like making duke eat something, which is also quite easy I still have no idea how to code something more serious and I'm just left with a bunch of commands I don't understand and don't know how to use:P
Sorry if you think I'm pathetic but somehow I can learn from other tutorials with success while here there are just few very simple examples which aren't followed by anything more serious so I'm still stuck in the black hole.
There were tutorials written a long time ago. For example, Reaper_Man has some here:
http://concode.planetduke.gamespy.com/
Look at "Actions Explained", "Writing a Basic Actor", etc There's also an old tut that covers a lot of stuff on the wiki.
But if you want tutorials that cover the newer EDuke commands, then you're out of luck. There is some stuff on the wiki, but you aren't going to find EDuke CON coding For Dummies.
#98 Posted 14 July 2009 - 10:39 AM
This post has been edited by Captain Awesome: 14 July 2009 - 10:40 AM
#99 Posted 14 July 2009 - 10:41 AM
#100 Posted 14 July 2009 - 10:59 AM
#101 Posted 14 July 2009 - 11:15 AM
This post has been edited by Spiker: 14 July 2009 - 11:15 AM
#102 Posted 14 July 2009 - 01:44 PM
Spiker, on Jul 14 2009, 11:42 AM, said:
When you begin coding you don't really care what this or other command do or mean in fact you shouldn't even know it. Most tutorials for other programs are constructed in the way that you are introduced to every issue by a series of exercises. For example there could be a tutorial "How to code a custom weapon" and it would contain step by step instructions and explanations what to do as it is in other tutorials like layers in Gimp or rigging and animation in Blender:P.
Of course you won't know everything after completing that tutorial but it would give you more understanding of the code and after some more exercises you will be able to "mix" the code from various exercises and to modify it. There is a perfect tutorial for mapping in build and it's very easy to understand but after reading examples of con coding like making duke eat something, which is also quite easy I still have no idea how to code something more serious and I'm just left with a bunch of commands I don't understand and don't know how to use:P
Sorry if you think I'm pathetic but somehow I can learn from other tutorials with success while here there are just few very simple examples which aren't followed by anything more serious so I'm still stuck in the black hole.
http://wiki.eduke32.com/wiki/Confaq42
I also have an old Eduke 2.0 con FAQ somewhere. Perhaps I should add it to the Wiki?
This post has been edited by Mblackwell: 14 July 2009 - 01:44 PM
#103 Posted 14 July 2009 - 06:11 PM
or have the old confaq updated to include EDuke32 concepts.
#104 Posted 15 July 2009 - 05:51 AM
ifvarand WEAPON8_FLAGS 3328 { subvar WEAPON8_FLAGS 3328 setvar WEAPON8_FLAGS 4 }
I don't know why, but this little change refuses to work. This code is in the EVENT_FIREWEAPON event, under a switch which checks the current weapon of the player. I used a simple setvar command at first, but addlogvar command showed that the flags are still set to 3328 ( 2048, 1024 and 256; STAND_STILL (this must go away), CHECKATRELOAD (some specific tripbomb control) and NOVISIBLE). Is this hardcoded?
#105 Posted 15 July 2009 - 08:03 AM
#106 Posted 15 July 2009 - 08:19 AM
This post has been edited by XThX2: 15 July 2009 - 08:19 AM
#107 Posted 15 July 2009 - 02:14 PM
Locked
Unlocked, with Key
Unlocked, without Key
#108 Posted 15 July 2009 - 03:43 PM
This post has been edited by XThX2: 15 July 2009 - 03:43 PM
#109 Posted 17 July 2009 - 05:44 AM
{ eshoot GRAYROCKET getactor[THISACTOR].x x getactor[THISACTOR].y y getplayer[THISACTOR].ang TEMP setvarvar x2 x addvar x2 384 setvarvar y2 y subvar y2 128 rotatepoint x y x2 y2 TEMP x3 y3 setactor[RETURN].x x3 setactor[RETURN].y y3 eshoot GRAYROCKET addvar y2 256 rotatepoint x y x2 y2 TEMP x3 y3 setactor[RETURN].x x3 setactor[RETURN].y y3 }
I don't know why, but this projectile goes through walls if you fire really close to the wall. (I think it is because of the rotatesprite) How can I prevent it ? Here's the code of the projectile itself in any case.
defineprojectile GRAYROCKET PROJ_WORKSLIKE 65538 defineprojectile GRAYROCKET PROJ_SPAWNS EXPLOSION2 defineprojectile GRAYROCKET PROJ_VEL 814 defineprojectile GRAYROCKET PROJ_EXTRA 300 defineprojectile GRAYROCKET PROJ_ISOUND GRAY_BOOM defineprojectile GRAYROCKET PROJ_XREPEAT 48 defineprojectile GRAYROCKET PROJ_YREPEAT 48 defineprojectile GRAYROCKET PROJ_HITRADIUS 2600 defineprojectile GRAYROCKET PROJ_OFFSET 128 defineprojectile GRAYROCKET PROJ_CLIPDIST 48
And a different question, what does ifvaror do? Is it like "if variable Y is added X, then do" ?
This post has been edited by XThX2: 17 July 2009 - 06:31 AM
#110 Posted 17 July 2009 - 08:13 AM
XThX2, on Jul 17 2009, 09:44 AM, said:
I assume it does a bitwise OR and executes the code block if the result is not zero.
This post has been edited by Dr. Kylstein: 17 July 2009 - 08:19 AM
#111 Posted 18 July 2009 - 03:23 PM
This post has been edited by XThX2: 18 July 2009 - 03:24 PM
#112 Posted 20 July 2009 - 12:00 AM
I am only using it as I always used:
Quote
May I have missed certain update note and I am using a out-of-date sintax? =/
#113 Posted 20 July 2009 - 01:23 PM
#114 Posted 22 July 2009 - 02:17 AM
Quote
define SECTOREFFECTOR 1
define ACTIVATOR 2
(...)
define SMALLSMOKE 3610
2) Does the Shrinker HUD weapon glowing is stored somewhere? I mean, the crystal HUD tile seems to change it's shading. Is it stored somewhere in a structure member?
#116 Posted 22 July 2009 - 10:26 AM
2) It's in the WEAPONx_... gamevars, I think WEAPON6 to be exact.
#117 Posted 22 July 2009 - 10:28 AM
#118 Posted 22 July 2009 - 11:58 AM
This post has been edited by M210: 22 July 2009 - 12:00 PM
#119 Posted 22 July 2009 - 01:02 PM
When hit by a weapon (ifhitweapon OR getactor[THISACTOR].htextra temp ifvarg temp 0) get the angle your actor got hit, add 1024 to it, set your actors angle to the new angle and make it shoot a projectile that looks exactly like this actor, and then kill the shooting actor. Make sure this new projectile has bounces off walls tag along with a few others that you find necessary. (I don't have time to type out the whole code)
This post has been edited by XThX2: 22 July 2009 - 01:02 PM
#120 Posted 22 July 2009 - 01:40 PM
Angle of actor may get through code
getactor[THISACTOR].htang tmp cos x tmp sin y tmp movesprite THISACTOR x y 0 CLIPMASK RETURN
and need get a ID of wall which have contact with actor and reflect it. but how to get it ID of wall?
This post has been edited by M210: 22 July 2009 - 01:49 PM