Duke4.net Forums: EDuke32 Scripting - Duke4.net Forums

Jump to content

  • 124 Pages +
  • « First
  • 3
  • 4
  • 5
  • 6
  • 7
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

#121

View PostIlovefoxes, on Jul 22 2009, 06:17 AM, said:

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?

Maybe this?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#122

View PostDr. Kylstein, on Jul 22 2009, 09:12 PM, said:

Maybe this?
That may work. :blink: I will check the values later.
0

User is offline   Cage 

#123

How to scale hardcoded sprites? I've tried sizeat, setting actor's.x/yrepeat, both in actor code and using event (eventloadactor IIRC) and it still doesn't work properly - the sprite sizes when it's seen, not immediately at startup
0

User is offline   XThX2 

#124

Strange, this code actually works for hardcoded sprites for me;

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)
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#125

View PostCage, on Jul 23 2009, 08:14 AM, said:

How to scale hardcoded sprites? I've tried sizeat, setting actor's.x/yrepeat, both in actor code and using event (eventloadactor IIRC) and it still doesn't work properly - the sprite sizes when it's seen, not immediately at startup
Do it at EVENT_GAME.

Quote

onevent EVENT_GAME
ifactor SHOTGUNAMMO
sizeat 50 50
endevent

0

User is offline   MIKE SIMS 

#126

can someone help me with the nightvision rotate sprite effect? I've tried several different coordinates and codes and none seem to display sprites on screen when night vision is in use..

This post has been edited by MIKE SIMS: 26 July 2009 - 05:05 PM

0

User is offline   Jimmy 

  • Let's go Brandon!

#127

Use about 150 for both the X and Y dimensions, this should bring it somewhere visible on the screen.
0

User is offline   MIKE SIMS 

#128

ALSO, I want to make the muzzle flashes for the weapons transparent (just the regular duke weapons for now), I know it's probably simple but I think this would be a quicker way to figure it out
0

User is offline   MIKE SIMS 

#129

View PostCaptain Awesome, on Jul 26 2009, 06:17 PM, said:

Use about 150 for both the X and Y dimensions, this should bring it somewhere visible on the screen.

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.
0

User is offline   Chip 

#130

Is there any way to increase the speed of a model animation through cons?
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

0

User is offline   XThX2 

#131

HTG_T might be of use to you. Find the number that represents the animation speed.
0

User is offline   Chip 

#132

Hmm, number 3 seems to refer to "animspeed" but I'm thinking that only referes to its sprite animation speed (which has no effect on a 3D model animation speed) But I'll try it out later today.

This post has been edited by Chip: 27 July 2009 - 03:55 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#133

Hendricks266 said:

1) Odd, it worked for me.
Phew, I have a problem with dynamicremap.

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:

Posted Image

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)

  • Attached File  DEFS.zip (8.9K)
    Number of downloads: 1026

0

User is online   Danukem 

  • Duke Plus Developer

#134

Useractors spawn at size 1 1, which is a good thing, whereas a lot of the original actors (like SMALLSMOKE) have specific hardcoded sizes depending on the situation. When tiles are moved with dynamicremap they lose some of their hardcoded properties. I remember having that problem once before with it, and I have never tried to use the command since.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#135

Yeah, but I want to use it. The point is that I know it is probably an error because early syntax doesn't used to do that.
0

User is offline   Chip 

#136

I've just seen "modvar" on the wiki but not too sure exactly what it does.

Quote

modvar <gamevar> <value>
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?
0

#137

No, % is the symbol (in programming) for the MOD operator, that is, it returns only the remainder of the number. IE:

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

0

User is offline   Chip 

#138

Aww, I was hoping it would be a percentage work out.
Thanks for the info.
0

User is offline   XThX2 

#139

I need help at making a projectile (actor based) going where the player looks. (Up/down wise) It has to do with the zvel of the actor I'm sure, that's where I get stuck. I couldn't make it use player's up/down angle to change it's zvel. (Used horiz)

		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

0

User is offline   Hendricks266 

  • Weaponized Autism

  #140

I believe you need to set the zvel, not the z of the actor. You may also want to use zshoot.

This post has been edited by Hendricks266: 31 July 2009 - 09:26 AM

0

User is offline   MIKE SIMS 

#141

any tips for making a "health bar" HUD rather than the numeric health? or how to get the ammo on screen like I've seen in some mods (the shells)
0

User is offline   XThX2 

#142

Well I used a hud like that. In my case, I had small gemstones lined up for both health and armor, and a pointer above the first gemstone.

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)
0

#143

View PostMIKE SIMS, on Jul 31 2009, 10:47 PM, said:

any tips for making a "health bar" HUD rather than the numeric health? or how to get the ammo on screen like I've seen in some mods (the shells)

How to make a health bar

This post has been edited by Dr. Kylstein: 01 August 2009 - 08:37 AM

0

User is online   Danukem 

  • Duke Plus Developer

#144

View PostDr. Kylstein, on Aug 1 2009, 08:59 AM, said:

Assuming HEALTHBAR is the name of a 2x16 tile:
gamevar temp 0 2
gamevar xvar 0 2
onevent EVENT_DISPLAYREST {
   setvar xvar 0 // set starting x coordinate
   getactor[THISACTOR].extra temp // get the player's health
   whilevarn temp 0 { // loop for each hitpoint
	   rotatesprite xvar 184 65536 0 HEALTHBAR 0 0 16 0 0 xdim ydim // draws HEALTHBAR at (xvar,184)
	   addvar xvar 2 // move to the right
	   subvar temp 1 // next hitpoint
   }
} endevent


Edit: this would be a rather large bar, however. You could "divvar temp <number>" before starting the loop to make each bar worth more points.
I might add a more thought-out version to the wiki later.


Yep, that's pretty much what I've been doing for bars in my mods (like the air left bar in DP that appears when you go under water without scuba gear, etc)
0

User is offline   MIKE SIMS 

#145

View PostDr. Kylstein, on Aug 1 2009, 08:59 AM, said:


i love you (no homo) :blink: So I'm assuming a um.. Kill Counter would essentially work the same?
0

#146

View PostMIKE SIMS, on Aug 2 2009, 07:09 PM, said:

i love you (no homo) :blink: So I'm assuming a um.. Kill Counter would essentially work the same?

Any number you want. Just replace "getactor[THISACTOR].extra temp" and adjust BARSCALE as needed.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#147

I am trying to make an projectile (RPG) hitscan what object it will hit. Although I am unable to discovery which value I should put as vertical angle.

As I could figure, to make an RPG have the same horizontal and vertical speed (an angle of 45º) the .zvel should be 16x the xvel. But this is as far as I could get... any help, please?

This post has been edited by Ilovefoxes: 04 August 2009 - 09:49 AM

0

User is online   Danukem 

  • Duke Plus Developer

#148

View PostIlovefoxes, on Aug 4 2009, 10:42 AM, said:

I am trying to make an projectile (RPG) hitscan what object it will hit. Although I am unable to discovery which value I should put as vertical angle.

As I could figure, to make an RPG have the same horizontal and vertical speed (an angle of 45º) the .zvel should be 16x the xvel. But this is as far as I could get... any help, please?


Take the projectile's zvel and shift it 14 to the left for the hitscan parameter. I discovered that a few years ago and it seems to work fine.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#149

Hah, thanks! It's quite easy, I see... =P And I was trying to understand how to make an arctan2.

This post has been edited by Ilovefoxes: 04 August 2009 - 07:08 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#150

I am trying to make an heat-seeking weapon... although every time I shoot two times and the first shot kill the enemy, the sprites is deleted and them the second shot has an invalid sprite ID. How does can I check if an ID actually exists as specific sprite?
0

Share this topic:


  • 124 Pages +
  • « First
  • 3
  • 4
  • 5
  • 6
  • 7
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options