EDuke32 Scripting "CON coding help"
#736 Posted 10 February 2012 - 11:47 AM
#737 Posted 11 February 2012 - 04:47 AM
DeeperThought, on 10 February 2012 - 11:47 AM, said:
Well, in this case it really isn't random, which is why I brought it up. And while the frequency with which it's happening (nearly every time) is definitely a problem, it isn't just that; the crash is happening on too consistent and too manageable of a basis. If I'm in a map that doesn't have the actor in it, the crash never occurs. If I take all of the sound commands out of the actor, it won't happen either. If I just use the WHITENOISE sound, it happens the majority of the time, and if I use both sounds, it happens every time without fail. I shuffled a few lines of the actor's code around last night so it'd run a bit more efficiently, but nothing's changed, and different builds of eDuke don't give me any different results either. I shouldn't make a big deal out of it, and essentially I'm not since I can just keep the sounds out, push comes to shove. But the whole thing still seems weird, and while I've dealt with exit crashes too, this one seems like its in a league of its own.
*EDIT*
And not even an hour after I posted this, I checked the actor out in-game once more, and the crash isn't happening at all now if I just use the WHITENOISE sound (though it'll still crash every time if the other sound is included). I don't know what the fuck...
This post has been edited by EmericaSkater: 11 February 2012 - 05:38 AM
#738 Posted 11 February 2012 - 05:55 AM
edit: most conveniently in a zip to just -gTHE.zip and run it...
#739 Posted 19 February 2012 - 08:03 PM
EDIT: Another thing, while bugging out my player into the floor I discovered a kind of neat bug(?). Would there be any way to reproduce the weapon motions here via con?
This post has been edited by Wolf: 19 February 2012 - 09:26 PM
#740 Posted 20 February 2012 - 02:27 AM
#741 Posted 21 February 2012 - 07:51 PM
setvar x <SOME_X_POSITION>
addvarvar x weapon_xoffset
subvarvar x looking_angSR1
setvar y <SOME_Y_POSITION>
addvarvar y looking_arc
subvarvar y gun_pos
Then modify the player member look_ang:
http://wiki.eduke32.com/wiki/Look_ang
Eg:
setplayer[THISACTOR].ang 1536
getplayer[THISACTOR].angvel ANGVEL
getplayer[THISACTOR].look_ang LOOK_ANG
addvarvar LOOK_ANG ANGVEL
setplayer[THISACTOR].angvel 0
Should give you the general effect. Note that you won't be able to physically turn*, but it will give the impression that you're turning your head around. Have fun!
*Obviously modify the code to fit your design and desires.
#742 Posted 24 February 2012 - 03:35 PM
I used some of the weapon structures here http://wiki.eduke32....layer_structure
Have fun :S
This post has been edited by rasmus thorup: 24 February 2012 - 03:38 PM
#743 Posted 02 March 2012 - 02:30 AM
Also why won't any of my custom grp's show in the game selection window?
#744 Posted 02 March 2012 - 04:43 AM
operateactivators, operatemasterswitches, operaterespawns, operatesectors, activatebysector doesn't works for it. How to do this?
#745 Posted 02 March 2012 - 05:16 AM
M210, on 02 March 2012 - 04:43 AM, said:
Yeah, none of those commands will work because the lightswitch doesn't work with activators or sector tags (etc.) it all happens within the SE. That being said, you'd have to find some way to alter the SE to make it jive with checkactivatormotion or something like that. I don't mess around with SE's or really any of those actors so I can't help with that. If I were you, I'd just make a new actor that uses checkactivatormotion, then changes the floorshade of the sector it's in to a certain parameter defined in its hitag (or some other struct member like that) if the activator in motion equals a certain other struct member (lotag, extra, etc.)
And as long as I'm mentioning checkactivatormotion, is there some other sort of command I'm not aware of that checks the motion of a sector itself? I created an actor some time ago that would play two different, specific sounds for when a door opened and closed (like in Doom), but ATM it's using checkactivatormotion to keep tabs of when the door's actually opening and when it's closing, ergo every door that uses this actor HAS to be operated by a switch. I'd kind of like for it to also work with regular doors that you can open with the spacebar, but I can't find any command or check that would help with that.
#746 Posted 02 March 2012 - 05:42 AM
#747 Posted 02 March 2012 - 05:47 AM
that's very easy to get via bullets like this
getactor[THISACTOR].picnum picnum
ifvare picnum SHOTSPARK1
{
getactor[THISACTOR].htg_t 6 tmp
ifvare tmp -1
{
getactor[THISACTOR].htg_t 7 sectorid
getactor[THISACTOR].z sector_z1
getsector[sectorid].ceilingz sector_z2
ifvarvare sector_z2 sector_z1 { }
}
}
but I can't to make such code for projectiles...
because projectiles can damage ceilings even if it get into the wall
This post has been edited by M210: 02 March 2012 - 05:51 AM
#748 Posted 03 March 2012 - 02:07 AM
And about mapster32 scripts. I got a one idea when I saw savegamevar
Maybe make those command for mapster32? Save a variable and value to file in m32 than call variable in the game?
#749 Posted 12 March 2012 - 07:52 AM
I've made an actor that is supposed to trigger activators whose lotag match the actor's hitag when it's killed (it's a monster). The code works fine bacause it prints out the debugging quote I've added, but it's not triggering the activators. Even if I set it to operate activators defined by a fixed number (just in case I'm not parsing the hitag correctly), it won't work.
getplayer[THISACTOR].i TEMP
checkactivatormotion HITAG
ifvarn RETURN 1
{
quote 100
operateactivators HITAG TEMP
}
This code is executed on the ifdead... section of the actor's ifhitweapon code.
This post has been edited by Diaz: 12 March 2012 - 08:01 AM
#750 Posted 12 March 2012 - 08:01 AM
#751 Posted 12 March 2012 - 08:55 AM
#752 Posted 12 March 2012 - 01:41 PM
Diaz, on 12 March 2012 - 08:55 AM, said:
Well it's important insofar as players that don't exist can't activate shit.
#753 Posted 12 March 2012 - 02:07 PM
#754 Posted 18 March 2012 - 07:00 AM
Thanks for helping me out
#755 Posted 18 March 2012 - 08:46 AM
320x240 = 4:3
Duke actually uses 320x200 which is 16:10. Then it does some weird crap and stretches that to fit in various 4:3 resolutions.
So first start there, make your graphic the correct 320x200 resolution and that will "fill the screen" on a 4:3 res. Then in rotatesprite (or myospal or whatever) set your orientation to 1024. Note that this will distort the image, but it WILL cover the screen.
Setting widescreen has no effect on graphics that weren't displayed with orientation 1024 set.
#756 Posted 18 March 2012 - 09:44 AM
#757 Posted 25 March 2012 - 04:46 AM
Is it possible to make it so enemies (hardcoded and useractor enemy) do NOT light themselves up when firing projectiles?
Right now I'm making them notenemy but ofcourse there are some drawbacks, like autoaim not working on them...
#758 Posted 25 March 2012 - 06:28 AM
Diaz, on 25 March 2012 - 04:46 AM, said:
Is it possible to make it so enemies (hardcoded and useractor enemy) do NOT light themselves up when firing projectiles?
Right now I'm making them notenemy but ofcourse there are some drawbacks, like autoaim not working on them...
For the polymer lights Htflags should theoretically do it.
Also... I'm not sure how not being able to autoaim at enemies is a drawback
#759 Posted 25 March 2012 - 06:35 AM
#760 Posted 25 March 2012 - 06:45 AM
James, on 25 March 2012 - 06:35 AM, said:
Shooting a projectile doesn't light anything up though (at least if it's notenemy). The exception to this is polymer, because things like SHOTSPARK1 are coded to cause a light to spawn.
#761 Posted 25 March 2012 - 06:53 AM
Mblackwell, on 25 March 2012 - 06:45 AM, said:
Yeah an enemy actor does become fullbright if they're firing a shotspark weapon, I thought that was what he meant.
#762 Posted 25 March 2012 - 06:53 AM
#763 Posted 25 March 2012 - 07:05 AM
Plagman, on 25 March 2012 - 06:53 AM, said:
Setting the shade manually would be the only way to do it then afaik.
#764 Posted 25 March 2012 - 07:25 AM
This post has been edited by Diaz: 25 March 2012 - 07:26 AM
#765 Posted 25 March 2012 - 08:18 AM
Diaz, on 25 March 2012 - 07:25 AM, said:
Are these enemies you are having the problem with on the regular enemy tile numbers (like PIGCOP, LIZMAN, etc.)?

Help
Duke4.net
DNF #1
Duke 3D #1


