EDuke32 Scripting "CON coding help"
#1291 Posted 24 May 2013 - 11:50 AM
#1292 Posted 25 May 2013 - 05:54 AM
Fox, on 24 May 2013 - 11:50 AM, said:
They're not part of the official API and thus off-limits to users. LunaCON will disallow setting them unless we specify the meaning of each one clearly and unambiguously. No more guessing and half-baked workarounds!
[Edit: it's not my intent to criticize anyone's work, but I hope it's clear that exposing functionality that is not 100% understood is just a dead end.]
#1293 Posted 30 May 2013 - 02:30 AM
another command to set a "hit radius" for a melee weapon ? the defineprojectile xxx PROJ_RANGE seems to set the depth but not a radius around the player...
#1294 Posted 30 May 2013 - 11:54 PM
setactor[THISACTOR].xrepeat X setactor[THISACTOR].yrepeat Y
I have used this within eventloadactor and it does nothing. Including these strings with ifactor inside EVENT_GAME also does nothing. The only thing which have worked is old style sizeat at the beginning of the actor code, but it resizes the actor upon seeing the player, which is bad. What am I doing wrong? :/
#1295 Posted 31 May 2013 - 12:09 AM
zazo, on 30 May 2013 - 02:30 AM, said:
another command to set a "hit radius" for a melee weapon ? the defineprojectile xxx PROJ_RANGE seems to set the depth but not a radius around the player...
Making an explosive hitscan would require more work.
This post has been edited by Fox: 31 May 2013 - 12:10 AM
#1296 Posted 31 May 2013 - 09:18 AM
Fox, on 31 May 2013 - 12:09 AM, said:
Not too much, though. You could set PROJ_SPAWNS to an actor that explodes with whatever hitradius you want.
#1297 Posted 31 May 2013 - 09:46 AM
#1298 Posted 31 May 2013 - 10:23 AM
Fox, on 31 May 2013 - 12:09 AM, said:
Of course, I am not that stupid Anyway the whole thing looked like this:
eventloadactor MOSQUITO setactor[THISACTOR].xrepeat 10 setactor[THISACTOR].yrepeat 10 enda
Why it doesn't work? WHYYYY?
Maybe it's because in erampage, but it should work...
#1300 Posted 31 May 2013 - 10:56 AM
Fox, on 31 May 2013 - 10:36 AM, said:
Hard-coded or not, why is it resized freely by "sizeat", but not by the code from above?
This post has been edited by LAW: 31 May 2013 - 10:57 AM
#1301 Posted 31 May 2013 - 11:27 AM
#1303 Posted 31 May 2013 - 12:01 PM
LAW, on 31 May 2013 - 10:56 AM, said:
It shouldn't.
#1304 Posted 01 June 2013 - 02:49 AM
zazo, on 30 May 2013 - 02:30 AM, said:
another command to set a "hit radius" for a melee weapon ? the defineprojectile xxx PROJ_RANGE seems to set the depth but not a radius around the player...
That´s something I´m also interested in.
#1305 Posted 05 June 2013 - 12:29 AM
Trooper Dan, on 31 May 2013 - 09:18 AM, said:
Yes, but it muste be a hitradius that not hurt the player, only enemy. And a "knee" weapon style, not explosion ...
#1306 Posted 08 June 2013 - 05:20 AM
I have an enemy, which does a few things upon dying when spritepal 30, 31 or 32. It works, when that enemy is put on the ground in Build. However, when it is spawned by a RESPAWN it does nothing and judging from its spritepal dependant behaviour it has pal 0. I've come with an idea to put the foe on the conveyor belt, where it could be moved into the silent teleport. But somehow it doesn't bother the conveyor belt's motion and it doesn't fall into the teleport's chasm even though it has 'fall' command in its code. Changing 'actor' to useractor enemy' also doesn't change things.
I've tried to code it out in EVENT_GAME. Maybe my logic is wrong, but I will show, what was done:
gamevar OWNER 0 0 gamevar PAL 0 0 ifactor MAMA getactor[THISACTOR].owner OWNER ifvare OWNER RESPAWN getactor[OWNER].pal PAL setactor[THISACTOR].pal PAL //OR ifvare PAL 30 spritepal 30
It doesn't work. Is there a workaround to have that enemy appear on demand and do the special actions?
This post has been edited by LAW: 08 June 2013 - 05:20 AM
#1307 Posted 08 June 2013 - 06:25 AM
This post has been edited by XThX2: 08 June 2013 - 06:26 AM
#1308 Posted 08 June 2013 - 07:43 AM
#1309 Posted 08 June 2013 - 07:48 AM
#1310 Posted 08 June 2013 - 07:57 AM
LAW, on 08 June 2013 - 05:20 AM, said:
Not really, in the bosses case it has been hard-coded to work that way. Surprisingly the Assault Tropper has been forgotten, as a result it fails to respawn Captains instead.
This post has been edited by Fox: 08 June 2013 - 08:02 AM
#1311 Posted 08 June 2013 - 08:00 AM
#1312 Posted 08 June 2013 - 08:02 AM
LAW, on 08 June 2013 - 05:20 AM, said:
gamevar OWNER 0 0 gamevar PAL 0 0 ifactor MAMA getactor[THISACTOR].owner OWNER ifvare OWNER RESPAWN getactor[OWNER].pal PAL setactor[THISACTOR].pal PAL //OR ifvare PAL 30 spritepal 30
It doesn't work. Is there a workaround to have that enemy appear on demand and do the special actions?
There are some problems with your code. First of all the .owner may be reseted after EVENT_EGS, so you should save it to a gamevar before.
Also shouldn't the code after "ifactor MAMA" be inside of brackets? Without it the code would attempt to change the pal of all sprites, including the RESPAWN ones.
LAW, on 08 June 2013 - 08:00 AM, said:
I think it doesn't apply here since EVENT_GAME runs regardless of the actor being seen yet by player or not.
This post has been edited by Fox: 08 June 2013 - 08:03 AM
#1313 Posted 08 June 2013 - 10:45 AM
Fox, on 08 June 2013 - 08:02 AM, said:
Uh, oh I have forgot about this event - it has soooo unimpressive name
So now everything works like a charm. Thanks Fox. I am a foxy gentleman and I like foxes
#1315 Posted 17 June 2013 - 01:01 AM
#1316 Posted 17 June 2013 - 01:53 PM
#1318 Posted 17 June 2013 - 05:53 PM
#1319 Posted 18 June 2013 - 01:07 AM
view portal ? miror code for floor ???
have some code or mapster keys for this ??