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

Jump to content

  • 124 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   Jimmy 

  • Let's go Brandon!

#52

Thanks, DT. I've figured it out. For future reference, the angle wouldn't let the hitscan register I don't think. I had to subtract 960 from the angle to get it to work.
0

User is offline   XThX2 

#53

What are the ways to increase the clipdist of a projectile other than defining it in the defineprojectile part? In my case, one of the monsters shoots fireballs at the player, but they don't hit him, and just go through. I've increased the clipdist to 160 but nothing happens... (The projectile isn't even that big at all, it's a png, so I used the setuptile command to buff it's size up, maybe that's the problem. But, it's size is meant to be big) Any advice?
0

User is offline   Danukem 

  • Duke Plus Developer

#54

View PostXThX2, on Jul 3 2009, 09:26 AM, said:

What are the ways to increase the clipdist of a projectile other than defining it in the defineprojectile part? In my case, one of the monsters shoots fireballs at the player, but they don't hit him, and just go through. I've increased the clipdist to 160 but nothing happens... (The projectile isn't even that big at all, it's a png, so I used the setuptile command to buff it's size up, maybe that's the problem. But, it's size is meant to be big) Any advice?


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

0

User is offline   XThX2 

#55

View PostDeeperThought, on Jul 3 2009, 08:56 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.


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

User is offline   Danukem 

  • Duke Plus Developer

#56

View PostXThX2, on Jul 3 2009, 10:03 AM, said:

Eitherway, I think the maximum clipdist value must be increased. (In case of a very very big projectile, or a monster)


You have a monster or projectile that needs more than 255 clipdist? ;)
0

User is offline   XThX2 

#57

View PostDeeperThought, on Jul 3 2009, 09:06 AM, said:

You have a monster or projectile that needs more than 255 clipdist? ;)


Soon to have ;)
0

User is offline   Danukem 

  • Duke Plus Developer

#58

This is like using an instant messenger.
0

User is offline   XThX2 

#59

Quote

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

User is offline   Chip 

#60

I'm having great difficulty in trying to do something simple.
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

0

User is offline   Jimmy 

  • Let's go Brandon!

#61

You could try using "getthisactor[THISACTOR].owner TEMP" in like EVENT_EGS or EVENT_GAME, and it should give you all the information you need.
0

User is offline   XThX2 

#62

You could do that in the actor code anyway, type
getactor[RETURN].owner TEMP
by 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 blabla
or 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)
0

User is offline   Chip 

#63

View PostCaptain Awesome, on Jul 4 2009, 05:29 PM, said:

You could try using "getthisactor[THISACTOR].owner TEMP" in like EVENT_EGS or EVENT_GAME, and it should give you all the information you need.


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

User is offline   Chip 

#64

OK, it all worked!
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

getactor[RETURN].owner TEMP


That may come in handy later on.


Thanks guys.

This post has been edited by Chip: 04 July 2009 - 08:49 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#65

View PostChip, on Jul 4 2009, 09:46 AM, said:

So basically the getactor stuff worked better on projectiles then the getthisprojectile stuff.


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

User is offline   XThX2 

#66

Quote

Quote

Tribomb control
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

0

User is offline   Danukem 

  • Duke Plus Developer

#67

View PostXThX2, on Jul 4 2009, 10:47 AM, said:

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?


I can happily report that I've never messed with that stuff before, thereby getting me off the hook. ;)
0

User is offline   XThX2 

#68

What's the maximum amount of sound files you can define in defs.con and user.con?
0

User is offline   Spiker 

#69

Noobish question: How can I increase the number of displayed frames for explosion from 21 to 24 ;) I know this question may be obvious for you but I'm serious ;)

This post has been edited by Spiker: 05 July 2009 - 04:46 AM

0

User is offline   XThX2 

#70

action EXPLOSION (I don't know if this is the correct one) x y z t e

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

User is offline   Jblade 

#71

View PostXThX2, on Jul 5 2009, 01:37 PM, said:

What's the maximum amount of sound files you can define in defs.con and user.con?

The max sound limit's 2560.
0

User is offline   Jimmy 

  • Let's go Brandon!

#72

View PostJames, on Jul 5 2009, 10:27 AM, said:

The max sound limit's 2560.

And if you pass that number, you're a pretentious dick. ;)
0

User is offline   MIKE SIMS 

#73

View PostDeeperThought, 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 ;) I tried different variables countless times... what would be the demensions & coordinates if I wanted to just display a sprite dead center in the screen during HEAT_ON?
0

User is offline   XThX2 

#74

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

0

User is offline   Danukem 

  • Duke Plus Developer

#75

Because the value of TEMP was -16382, and valid sprite IDs are between 0 and 16383.

This post has been edited by DeeperThought: 06 July 2009 - 08:20 AM

0

User is offline   XThX2 

#76

Is it possible to make a projectile go through actors ? (One way I thought would be to make it a normal actor and have this in it's code, but I want to keep it as a projectile on it's own)

	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

0

User is offline   Danukem 

  • Duke Plus Developer

#77

View PostXThX2, on Jul 6 2009, 09:45 AM, said:

Is it possible to make a projectile go through actors ? (One way I thought would be to make it a normal actor and have this in it's code, but I want to keep it as a projectile on it's own)

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

User is offline   XThX2 

#78

Oh that explains why my actors were blocking... Thanks!

This post has been edited by XThX2: 06 July 2009 - 08:51 AM

0

User is offline   XThX2 

#79

How can I identify if an actor hit the wall or a sprite by htmovflag? I realized the bug errors given to me by the invalid sprite number is definitely because of hitting walls, and I need the code to not execute when that happens. To explain what I'm doing with htmovflag, I'm using it to deal damage to what it hit and spawn it's explosion frame. (The actor in question is a projectile with no defineprojectile)
0

User is offline   Spiker 

#80

Another question, how do I define new frames when for example the player is holding a shotgun? I would like to have a special set of frames for it like the kick has. Sorry if I'm asking obious questions but it's not so easy to find it in the wiki.
0

User is offline   Mblackwell 

  • Evil Overlord

#81

View PostSpiker, on Jul 7 2009, 08:00 AM, said:

Another question, how do I define new frames when for example the player is holding a shotgun? I would like to have a special set of frames for it like the kick has. Sorry if I'm asking obious questions but it's not so easy to find it in the wiki.


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

0

Share this topic:


  • 124 Pages +
  • 1
  • 2
  • 3
  • 4
  • 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