
EDuke32 Scripting "CON coding help"
#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
#123 Posted 23 July 2009 - 03:14 AM
#124 Posted 23 July 2009 - 03:17 AM
eventloadactor SHOTGUNAMMO setactor[THISACTOR].xrepeat 50 setactor[THISACTOR].yrepeat 50 enda actor SHOTGUNAMMO fall sizeat 50 50 . . .
Well, you may try changing the actor to an user actor if this doesn't work. This is the usual method I use for resizing my enemies. (Sizeat for when the actor spawns, eventloadactor for mapload)
#125 Posted 23 July 2009 - 06:45 AM
Cage, on Jul 23 2009, 08:14 AM, said:
Quote
ifactor SHOTGUNAMMO
sizeat 50 50
endevent
#126 Posted 26 July 2009 - 05:04 PM
This post has been edited by MIKE SIMS: 26 July 2009 - 05:05 PM
#127 Posted 26 July 2009 - 05:17 PM
#128 Posted 26 July 2009 - 05:45 PM
#129 Posted 26 July 2009 - 05:53 PM
Captain Awesome, on Jul 26 2009, 06:17 PM, said:
for some reason I got it to appear in the top left corner with x0 y0 dimensions... but when I try other dimensions it wont appear... I basically want to get it exactly where the crosshair is.
#130 Posted 27 July 2009 - 02:59 AM
I would like my character's movement animation to speed up when he moves faster but I don't want to have to result into defining the same animation loads of times accross many tile spaces.
This post has been edited by Chip: 27 July 2009 - 03:01 AM
#132 Posted 27 July 2009 - 03:55 AM
This post has been edited by Chip: 27 July 2009 - 03:55 AM
#133 Posted 27 July 2009 - 05:26 AM
Hendricks266 said:
I try it the simpliest way. I put the dynamicremap command on top of DEFS, and them define SMALLSMOKE 1660. And them it doesn't work properly, here is a screenshot:

As you can see, the SMALLSMOKE has no sizeat definition (and uses 1 by default) - It's not the same as not using dynamicremap, but it is not as functional as it was before (when used to add dynamicremap command before every define).
I have attached a file with the DEFS I am using, anyone else is having this problem?
Attached File(s)
-
DEFS.zip (8.9K)
Number of downloads: 1043
#134 Posted 27 July 2009 - 07:06 AM
#135 Posted 27 July 2009 - 12:28 PM
#136 Posted 30 July 2009 - 02:59 AM
Quote
This command sets <gamevar> to <gamevar>%<value>. It's a math operation which calculates a modulus(aka reminder) of <gamevar>/<value>.
Is this some kind of "percentage" relating var - working out a percentage of a number?
#137 Posted 30 July 2009 - 05:18 AM
3%2 = 1
5%3 = 2 (*shrug*)
2%2 = 0
3%10 = 3
2%10 = 2
and such stuff. At least, that's what I remember from my programming classes. It's a bit foggy now though.
If I understand right, it simply performs that mathematical operation of the gamevar divided/modded by value.
This post has been edited by Ryan Cordell: 30 July 2009 - 05:19 AM
#138 Posted 31 July 2009 - 02:50 AM
Thanks for the info.
#139 Posted 31 July 2009 - 03:37 AM
getplayer[THISACTOR].horiz horiz subvar horiz 100 mulvar horiz -2048 setactor[THISACTOR].z horiz
I used this because I read it hitscans where player looks , thought it could be useful. But it makes actors end up looking straight at the ground when I try to look down very slowly and vice versa.
Alternatively, if there's a way to make a projectile go through actors without making it an actor (I tried event_game but it didn't work, kept working like a projectile) I could use it too.
This post has been edited by XThX2: 31 July 2009 - 03:38 AM
#141 Posted 31 July 2009 - 06:47 PM
#142 Posted 01 August 2009 - 02:24 AM
Basically, I checked players health and placed them according to it, they won't display if their condition is false. You can, say put a health block per 5 health the player has. (Use DISPLAYREST event)