EDuke32 Scripting "CON coding help"
#1591 Posted 24 February 2015 - 03:15 PM
#1592 Posted 24 February 2015 - 03:21 PM
#1594 Posted 24 February 2015 - 03:45 PM
DavoX, on 24 February 2015 - 03:21 PM, said:
I lol'd...
The colours and shit are there for a reason...
But yes, notepad++ is what most programmers use.
You would have to be a idiot to try edit with notepad/word.
It removes all the formatting and indentation.
Also, if you want to learn LUA, the best place to start would be to look around the Garry's Mod community.
It's the main coding language used for all the mods/addons.
The structure *should* be identical to how it's used in EDuke32.
This post has been edited by Commander Cody: 24 February 2015 - 03:48 PM
#1595 Posted 24 February 2015 - 04:27 PM
#1596 Posted 24 February 2015 - 04:32 PM
define ROBOTDUDE *tilenumber*
and then you can simply use ROBOTDUDE if you want to refer to that actor in other code.
#1597 Posted 11 March 2015 - 12:28 AM
ifvare vaca_pose 1 { ai AIBEACHBABEPOSE break }
What is this? Vars are an eduke thing; the original Vacation did not have them.
If vaca_pose is set to 1, that will cause the sprite to do that ai and break, so that would make it freeze (since the ai in question doesn't move).
#1598 Posted 11 March 2015 - 02:03 PM
2. You are on the right track by using the Vaca+ con instead of the original one, because the original used nasty hacks to support v1.3D, which I removed in Vaca+ in the name of modularity. In addition, Vaca+ supported Duke Plus for a time until it added the Super Trooper in a non-modular fashion, so you have a better chance of it working right off the bat.
3. Remove the block Trooper Dan posted from your code; you won't need it. I added it to assist in taking screenshots: "vaca_pose" is a gamevar that is never changed during normal gameplay; I would set it from the console.
4. Be sure you defined all the sounds the beach babe uses. These come in two parts: a "define" for the label, which assigns the sound an ID number, and a "definesound", which gives the sound a file name and a few properties.
5. Be sure all the states that the code calls are included in the cons. For example, I don't see where you included "state stopbeachbabebathersounds".
#1599 Posted 20 March 2015 - 11:57 PM
Usually when those errors happen it is the RIGHT bracket that is missing, not the left. The code you have attached looks like it should work. It could be a compiler bug, but, in my experience the cause is usually something that is not being shown. There's a lot of stuff being loaded that you aren't showing us, including your custom def file.
You might want to try typing the girl code into a new CON file, just in case there are hidden characters in your file that are messing with the compiler. I have actually had that issue (long, long ago). While you are at it, replace the defined labels with constants.
#1600 Posted 21 March 2015 - 06:43 PM
1337DirtAlliance, on 21 March 2015 - 06:31 PM, said:
Use just 5225 instead of BEACHBABE1.
#1601 Posted 22 March 2015 - 06:33 AM
1337DirtAlliance, on 21 March 2015 - 11:13 PM, said:
Have you tried using a debug build to see if it gives you more information in the log file when it fails?
#1602 Posted 22 March 2015 - 07:37 AM
Trooper Dan, on 20 March 2015 - 11:57 PM, said:
Speaking of, are these ALL the CON files you are using?
#1603 Posted 22 March 2015 - 08:41 AM
GIRLS.CON compiles fine as a module for me ("-mx GIRLS.CON"). It may really be helpful if we could see all CON files that get translated. From the log, it seems like GAME.CON is the root file for you. I don't understand why the error spam appears long after the script has been compiled. Also, r4410 is somewhat outdated; please try the most recent synthesis build.
#1604 Posted 24 March 2015 - 05:23 AM
#1605 Posted 25 March 2015 - 02:26 PM
And that log actually says you don't have palette.dat.
#1607 Posted 26 March 2015 - 02:16 PM
1337DirtAlliance, on 26 March 2015 - 02:08 PM, said:
True. But it doesn't break the game.
This post has been edited by Fox: 26 March 2015 - 02:18 PM
#1608 Posted 26 March 2015 - 02:16 PM
1337DirtAlliance, on 26 March 2015 - 02:08 PM, said:
The original cons have warnings, yes, but they don't affect the game.
#1609 Posted 26 March 2015 - 03:56 PM
#1610 Posted 26 March 2015 - 04:02 PM
#1611 Posted 10 April 2015 - 10:40 AM
Nevermind, latest release on the port's webpage fixed the corrupted save game problem and also seems to load my con file again.
This post has been edited by Lava Grunt: 10 April 2015 - 10:47 AM
#1612 Posted 27 April 2015 - 04:13 PM
#1614 Posted 27 April 2015 - 05:23 PM
#1615 Posted 27 April 2015 - 05:33 PM
gamevar TEMP 0 0 gamevar TILT 0 1 onevent EVENT_DOFIRE switch player[THISACTOR].curr_weapon case PISTOL_WEAPON case CHAINGUN_WEAPON setvar TILT 3 break case SHOTGUN_WEAPON setvar TILT 10 break endswitch endevent onevent EVENT_GAME ifactor APLAYER ifvarn TILT 0 { getplayer[THISACTOR].horizoff TEMP addvarvar TEMP TILT setplayer[THISACTOR].horizoff TEMP setvar TILT 0 } endevent
This post has been edited by Fox: 27 April 2015 - 05:34 PM
#1616 Posted 27 April 2015 - 05:46 PM
#1617 Posted 22 May 2015 - 05:53 AM
However, a problem occurs - it appears that the setactorsoundpitch command doesn't set the sound pitch but instead adds/subtracts from what's already there (assuming it modifies the sound after any defined properties are added). This means sound files defined to have a random pitch will affect how setactorsoundpitch is applied. So if by random the defined sound pitch for the sound file gives it +256, then if setactorsoundpitch is set to -512, I end up with only -256 sound pitch.
Is there any way to have the sound pitch for a sound file be exactly what setactorsoundpitch sets? Can I reset the sound pitch for a sound before using setactorsoundpitch? Or is the only solution to remove all defined sound pitch flags from the sound files and use setactorsoundpitch to add them back, but not when my enemies get expanded?
This post has been edited by Chip: 22 May 2015 - 05:59 AM
#1618 Posted 22 May 2015 - 08:19 AM
Chip, on 22 May 2015 - 05:53 AM, said:
The behavior you've described is exactly as intended.
#1619 Posted 28 May 2015 - 04:49 AM
Next question: Can I prevent the player from saving the game? I tried using "setvar RETURN -1" from within EVENT_SAVEGAME, but the event continues as normal and a saved game is created.
This post has been edited by Chip: 28 May 2015 - 04:51 AM