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

Jump to content

  • 124 Pages +
  • « First
  • 26
  • 27
  • 28
  • 29
  • 30
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

User is offline   Diaz 

#804

I believe there's a command called "changespritestat" which changes statnum....
1

User is offline   m210® 

#805

Yeah, it's works <_< Thx
0

User is offline   m210® 

#806

Hi again. It there a command like espawn in mapster32.
I want add a sprite with differect x y z coordinats, picnum and other bits in mapster32 via script.
I don't understand how works insertsprite command and I think it's not what I need
0

User is online   Danukem 

  • Duke Plus Developer

#807

View PostM210, on 24 April 2012 - 02:06 AM, said:

I don't understand how works insertsprite command and I think it's not what I need


It probably is what you want, but it's not documented and I have never used it. But it should be possible to insertsprite and then set it to have the coords and other things you need.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#808

View PostM210, on 24 April 2012 - 02:06 AM, said:

Hi again. It there a command like espawn in mapster32.
I want add a sprite with differect x y z coordinats, picnum and other bits in mapster32 via script.
I don't understand how works insertsprite command and I think it's not what I need

For some reason I marked insertsprite as "deprecated/do not use", so I guess I wanted people to use dupsprite instead. It will clone the sprite with the given spritenum and set the current sprite to the newly inserted sprite. Movements should then be done with bsetsprite and attribute changes with "set .xxx yyy". The a.m32 script contains an example that constructs a round or linear staircase from one stair part and a pivot sprite.
0

User is offline   m210® 

#809

Ok thanks for question <_<
Can dupsprite command insert a nullsprite (picnum = 0) with xvel,yvel,zvel = 0?
It's very important to have a zero all the bits in new sprit

This post has been edited by M210: 24 April 2012 - 10:00 AM

0

User is offline   Helixhorned 

  • EDuke32 Developer

#810

By "clone" I meant that the inserted sprite has the same values for all sprite members as the source one.

Btw, the reason I discourage insersprite is that the member values are indeterminate after insertion, since the only thing it does is to allocate a new spritenum from the list.
1

User is offline   m210® 

#811

For test I have written a code for a enemy
onevent EVENT_ANIMATESPRITES
ifactor BUTCHER { settspr[THISACTOR].tsprang 512 }
endevent



action ABUTCHERWALK  0  4  5  1  20
ai AIBUTCHERWALK ABUTCHERWALK BUTCHERWALK
useractor enemy BUTCHER
getactor[THISACTOR].mdflags  tmp
orvar  tmp 16
setactor[THISACTOR].mdflags  tmp
ifai NO { sizeat 24 24 cstat 257 ai AIBUTCHERWALK }
....
....
bla bla bla
...
...
enda


But enemy still directed towards the player, why?

This post has been edited by M210: 02 May 2012 - 11:44 PM

0

User is offline   CruX 

#812

Uh...Is there any movement type being used for its AI? If not, using geth might do the trick, but I'm not sure why you're messing around with its tsprite in the first place, if you actually want it to change its angle. Didn't the tsprite array only effect how the sprite's drawn?
0

User is offline   m210® 

#813

I want the enemy doesn't turn away in the opposite direction if it is close to a wall or obstruction.
To understand what I want to make a better look at this video



As you can see the angle of the enemy is not related to the angle of direction. So I made ​​sure that the enemy doesn't turn away rapidly from the wall, but the animation turns out wrong, and the enemy begins like to walk backwards

This post has been edited by M210: 03 May 2012 - 03:04 AM

0

User is offline   m210® 

#814

I forgot about EVENT_GAME. Now I solved my problem
0

User is offline   Diaz 

#815

He kinda looks like Michael Jackson <_<
Glad you solved it!
0

User is offline   m210® 

#816

I thought about it too <_<

Attached thumbnail(s)

  • Attached Image: -001-112.jpg


This post has been edited by M210: 03 May 2012 - 04:14 AM

2

User is offline   Helixhorned 

  • EDuke32 Developer

#817

I'm thinking of assigning SE lights to an exclusive statnum when they spawn instead of throwing them into STAT_EFFECTOR like the other non-transporter SEs. This would have various benefits. Is there any CON code out in the wild that relies on SE lights having effector statnum?
0

User is offline   Diaz 

#818

Doesn't Duke Plus play with changespritestat for flickering lights?
0

User is offline   Helixhorned 

  • EDuke32 Developer

#819

View PostDiaz, on 06 May 2012 - 05:32 AM, said:

Doesn't Duke Plus play with changespritestat for flickering lights?

True, it seems to implement a light SE spawner which sets the spawned SE's statnum to STAT_EFFECTOR. I went ahead and made the change because the benefits outweigh everything else IMO. r2646 should be of interest to CON coders messing with lights.
0

User is online   Danukem 

  • Duke Plus Developer

#820

So the light controlling sprites will still have a picnum of 1, but a different statnum? I guess the only thing I would need to change in my code for this update is using the new statnum, right?
0

User is offline   Helixhorned 

  • EDuke32 Developer

#821

Should be all that's needed. It's 14, by the way.
0

User is offline   Diaz 

#822

The new sound-related events have broken something in one of my projects.

The pistol was supposed to play the firing sound plus a distinctive sound when only 5 shots were remaining in the clip. I did this by playing a sound on EVENT_DOFIRE when conditions were met. Now when there are 5 bullets left, that distinctive sound plays, but the pistol firing sound doesn't, and ammo is not substracted during these 5 shots.

This post has been edited by Diaz: 15 May 2012 - 01:44 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#823

That's probably because you set gamevar RETURN to something else.
0

User is offline   Diaz 

#824

But it was working fine until the last update... in fact if I revert to the previous one it does work right...
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#825

I understand. But set RETURN to zero anyway.
0

User is offline   Diaz 

#826

Nope, didn't help...
Anyways, got it fixed by using EVENT_FIRE instead and changing the code slightly.

This post has been edited by Diaz: 15 May 2012 - 10:35 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#827

I am not sure, but while DOFIRE runs each time a weapon fire, FIRE runs each time you press the fire button, meaning it's quite not related to the weapon itself.

I recommend you to use the code in the APLAYER code itself, and check if kickback_pic equals WEAPONX_FIREDELAY.
0

User is offline   Diaz 

#828

EVENT_FIRE seems to do the trick even when the fire button is being held. However, it looks like r2656 has fixed this problem, so I'm gonna check if EVENT_DOFIRE works now...
0

User is offline   m210® 

#829

Yeah, I have a some bugs now too.
For example at EVENT_WEAPKEY7 doesn't works setvar RETURN -1, therefore I received an unwanted ability to switch weapons (shrinker/expander )

This problem I got in rev2656

This post has been edited by M210: 16 May 2012 - 10:43 AM

0

User is offline   LAW 

#830

Hi there.

I am very "new" to eDuke32 and I do have a few questions.

1. I would like to change inventory icons for items without altering the .ART file. These tiles are reserved, so I can't redefine them via defs.con. So I thought of inven_icon thing. But how does it actually work?
2. Is it possible to make totally new sprite/actor switch operable? Like I push the button with proper tags and my actor does a new action...
3. How to redefine the position of HUD view of tripbomb without changing the .ART file?

That's all for now. I did a lot of things myself, but I am stuck with these. Thanks in advance.
0

User is offline   Mblackwell 

  • Evil Overlord

#831

1) Are you just wanting new art? You could just dummytile over the top of the old art and replace it with a custom icon (in duke3d.def).
2) Yes. You'd get it done using these: http://wiki.eduke32....erateactivators | http://wiki.eduke32....emasterswitches | http://wiki.eduke32....Operaterespawns | http://wiki.eduke32..../Operatesectors
3) You'd have to go into EVENT_DISPLAYWEAPON, cancel drawing if the tripbomb is being used, and then redraw it yourself (using rotatesprite, or myospal). There's an example included with EDuke32 showing how you'd re-display the weapons via CON.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #832

1) If you want to modify the 8-bit tiles for the inventory icons, use tilefromtexture. Texture is for OpenGL assets.

3) Use my weapons.con.sample, included in the samples directory with EDuke32. Include it from your cons and it will override the weapon display code in the exe with exact ports to CON. From there, you can modify positioning. If you want to move both the tripbomb and the hands down as a unit, increase the value of "addvar hud_y 10" at the start of "state draw_tripbomb". Moving it up will require some subtraction.
0

User is offline   LAW 

#833

Thanks for the quick info guys.

I use tilefromtexture 2461 { "pic.bmp" 0 } and it says bullshit about syntax errors and expecting keywords. Ok, I'll be honest. I modify erampage stuff, so is it possible it doesn't work there...
0

Share this topic:


  • 124 Pages +
  • « First
  • 26
  • 27
  • 28
  • 29
  • 30
  • 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