
EDuke32 Scripting "CON coding help"
#52 Posted 01 July 2009 - 03:38 PM
#53 Posted 03 July 2009 - 08:26 AM
#54 Posted 03 July 2009 - 08:56 AM
XThX2, on Jul 3 2009, 09:26 AM, said:
The problem isn't clipdist. The problem is that the dimensions of the tile that you have defined as the projectile are too large. I know it sounds strange, but trust me, there is an engine bug which makes large projectiles not hit the player. I've had to deal with it many times and it sucks. If you are using setuptile or dummytile, keep the dimensions down to like 16x16 to be safe. It's fine to use sizeat (or scale in the case of a model) to make it bigger in game, but the tile dimensions must be small.
This post has been edited by DeeperThought: 03 July 2009 - 08:58 AM
#55 Posted 03 July 2009 - 09:03 AM
DeeperThought, on Jul 3 2009, 08:56 AM, said:
Oh didn't know that. Thanks for response.
Eitherway, I think the maximum clipdist value must be increased. (In case of a very very big projectile, or a monster)
#56 Posted 03 July 2009 - 09:06 AM
XThX2, on Jul 3 2009, 10:03 AM, said:
You have a monster or projectile that needs more than 255 clipdist?

#57 Posted 03 July 2009 - 09:06 AM
DeeperThought, on Jul 3 2009, 09:06 AM, said:

Soon to have

#59 Posted 04 July 2009 - 02:56 AM
Quote
3 xpos
4 ypos
5 laser/tribomb angle
6 1: delay, 3:armed
7 Activate tribomb when T7 reach 0
This is from the "htg_t" article. How do you use htg_t for tripbomb control? I replaced it with a grenade launcher and when I fire, player halts for a very small second and then continues to move. I thought this could be from 1:Delay and would be fixed if I had turned it to 3:armed.
#60 Posted 04 July 2009 - 08:17 AM
I want a projectile to obtain the ID of who spawned it then have the projectile change its stats (damage / speed / size etc...) from collected gamevars from the spawner.
Firstly I can't seem to be able to make it know who spawned it and used a stupid method of findnearactor as a temp measure.
Secondly I can't get the projectile to change its stats, they are always the same. I.E: "setthisprojectile[THISACTOR].extra 50" does 2 damage which is what the projectile was defined at. Basically I don't appear to be able to override the default values allready defined.
I thought this was going to be easy and the thing I did this morning would be hard but it turned out to be the complete opposite for both.

Oh and I tried all my adjustments through event_egs. If I'm not meant to do it through there then how do I get my actor to obtain the ID of the projectile that it spawned?
This post has been edited by Chip: 04 July 2009 - 08:35 AM
#61 Posted 04 July 2009 - 08:29 AM
#62 Posted 04 July 2009 - 08:36 AM
getactor[RETURN].owner TEMPby using the eshoot command. The owner will give you the ID of the sprite which spawned it, so you can refer to the owner like
getactor[TEMP].bla blablaor anything like that.
To your second issue, I had the same problem too, couldn't figure out anything simple for that though. I ended up adding extra damage in actor code of every monster if got hit by that special projectile. (Refer to Dr. Kylstein or James' solution they gave you for adding up damage)
#63 Posted 04 July 2009 - 08:41 AM
Captain Awesome, on Jul 4 2009, 05:29 PM, said:
I didn't think the actor structure stuff works on projectiles hense why they had their own member structures but that has sovled part 1 of my problem.
Part 2 is having the projectile change its stats but if the actor member structure worked above then I guess I can use that here too?
I'm just going to do some testing now.
#64 Posted 04 July 2009 - 08:46 AM
So basically the getactor stuff worked better on projectiles then the getthisprojectile stuff.
setactor[THISACTOR].extra 50 worked in over riding the damage and now that I can have it obtain the spawner's ID I can therefore make changing damage amounts based on the actor using it (despite being the same actor sprite - this is my leveling system at work again)
Quote
That may come in handy later on.
Thanks guys.
This post has been edited by Chip: 04 July 2009 - 08:49 AM
#65 Posted 04 July 2009 - 09:37 AM
Chip, on Jul 4 2009, 09:46 AM, said:
Yeah, I have also noticed that get/set thisprojectile doesn't always work. That is to be expected if you are dealing with one of the old projectiles like RPG, but IIRC it is a problem with custom projectiles as well.
#66 Posted 04 July 2009 - 09:47 AM
Quote
Quote
3 xpos
4 ypos
5 laser/tribomb angle
6 1: delay, 3:armed
7 Activate tribomb when T7 reach 0
This is from the "htg_t" article. How do you use htg_t for tripbomb control? I replaced it with a grenade launcher and when I fire, player halts for a very small second and then continues to move. I thought this could be from 1:Delay and would be fixed if I had turned it to 3:armed.
DT, have you experienced with this before?
This post has been edited by XThX2: 04 July 2009 - 09:47 AM
#67 Posted 04 July 2009 - 10:14 AM
XThX2, on Jul 4 2009, 10:47 AM, said:
DT, have you experienced with this before?
I can happily report that I've never messed with that stuff before, thereby getting me off the hook.

#68 Posted 05 July 2009 - 04:37 AM
#69 Posted 05 July 2009 - 04:46 AM


This post has been edited by Spiker: 05 July 2009 - 04:46 AM
#70 Posted 05 July 2009 - 04:54 AM
x = How many frames should be skipped from the actor's define number.
y = Amount of frames.
z = Amount of angles.
t = I think this takes either 1 or -1 which are normal and inverse.
e = Action Time.
#71 Posted 05 July 2009 - 06:27 AM
XThX2, on Jul 5 2009, 01:37 PM, said:
The max sound limit's 2560.
#72 Posted 05 July 2009 - 09:47 AM
James, on Jul 5 2009, 10:27 AM, said:
And if you pass that number, you're a pretentious dick.

#73 Posted 05 July 2009 - 03:52 PM
DeeperThought, on Jun 30 2009, 10:50 AM, said:
onevent EVENT_DISPLAYREST ifvare player[THISACTOR].heat_on YES rotatesprite xcoord ycoord size rotation tilenumber shade color orientation 0 0 xdim ydim endevent
Look up rotatesprite in the EDuke32 wiki to understand this better. Replace the names I put in there (such as "tilenumber") either with numbers or your own variables. Good luck.
hmmm no luck

#74 Posted 06 July 2009 - 02:47 AM
Line 885, getactor: tried to get picnum on invalid target sprite (-16382) from spr 29 pic 1979 gv TEMP Line 885, getactor: tried to get picnum on invalid target sprite (-16382) from spr 28 pic 1979 gv TEMP
getactor[THISACTOR].htmovflag TEMP ifvarn TEMP 0 { addvar TEMP 16384 getactor[TEMP].picnum temp ifvarn temp UFORSAKEN ifvarn temp APLAYER setactorvar[THISACTOR].w_return 1 }
This code prints the messages at top of my post. Why does it do that? (Walls?)
This post has been edited by XThX2: 06 July 2009 - 02:48 AM
#75 Posted 06 July 2009 - 08:20 AM
This post has been edited by DeeperThought: 06 July 2009 - 08:20 AM
#76 Posted 06 July 2009 - 08:45 AM
getactor[THISACTOR].cstat cst ifvarand cst 1 { xorvar cst 1 setactor[THISACTOR].cstat cst }
This post has been edited by XThX2: 06 July 2009 - 08:45 AM
#77 Posted 06 July 2009 - 08:50 AM
XThX2, on Jul 6 2009, 09:45 AM, said:
getactor[THISACTOR].cstat cst ifvarand cst 1 { xorvar cst 1 setactor[THISACTOR].cstat cst }
That's the wrong cstat bit. The one you want is 256. Other than changing cstat on the sprites, I don't know how you could prevent a projectile from hitting them.
#78 Posted 06 July 2009 - 08:51 AM
This post has been edited by XThX2: 06 July 2009 - 08:51 AM
#79 Posted 07 July 2009 - 03:14 AM
#80 Posted 07 July 2009 - 05:00 AM
#81 Posted 07 July 2009 - 07:33 AM
Spiker, on Jul 7 2009, 08:00 AM, said:
So your goal is to replace the shotgun with a completely custom art sequence?
Then what you're going to want is getplayer[THISACTOR].kickback_pic.
http://wiki.eduke32....ki/Kickback_pic
From there you can use EVENT_DISPLAYWEAPON to display your frames using rotatesprite.
To define TOTALTIME, etc, you will want these vars:
WEAPONx_CLIP
WEAPONx_FIREDELAY
WEAPONx_FIRESOUND
WEAPONx_FLAGS
WEAPONx_INITIALSOUND
WEAPONx_SHOOTS
WEAPONx_SHOTSPERBURST
WEAPONx_SPAWN
WEAPONx_SPAWNTIME
WEAPONx_TOTALTIME
(too many to link, just look them up on the Wiki)
Note that x indicates the weapon slot number.
EDIT:
Isn't there also a WEAPONx_RELOADTIME or something along those lines? I didn't see it listed in the Wiki, but I seem to recall that when CLIP is reached RELOADTIME is added to TOTALTIME (and thus kickback_pic's value/sequence).
This post has been edited by Mblackwell: 07 July 2009 - 07:38 AM