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

Jump to content

  • 119 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   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 offline   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

User is offline   Helixhorned 

  • EDuke32 Developer

#834

They're key/value pairs, like
tilefromtexture 2461 { file "pic.bmp" alphacut 0 }

(assuming it was alphacut you meant.)
0

User is offline   Jblade 

#835

Heh heh, I know this seems like a strange question, but the default shotspark1 damage does the PISTOL_WEAPON_STRENGTH defined in user con plus up to 5 damage randomly right? I swear I saw it in the CON files that it said so but I can't find it so maybe it was only in v1.3d or something?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#836

Yeah, that was written in the 1.3 version.

define PISTOL_WEAPON_STRENGTH            6  // Adds rand()%5 (0 to 5)


That's still true for Atomic Edition.
2

User is offline   Jblade 

#837

Cool, just needed someone else to confirm it as well. Thanks.
0

User is offline   LAW 

#838

The story with tilefromtexture continues. This is what I wrote:
 tilefromtexture 2461 { file "pic.bmp" alphacut "0" xoff "0" yoff "0" } 


And the result is the same. Maybe erampage doesn't support DEF files... I named it redneck.def and used include redneck.def in game.con.

Back to my previous question about switch-operated actors. I want the actor to change his attributes when I push the dipswitch with the same lotag (cstat for example). Is it possible?

Also is it possible to make make an RPG subweapon (like shrinker/expander) or do I have to make a separate weapon?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#839

This is one line from a def file I am using right now:

tilefromtexture 8200 { file "tiles/weapons/CHGGA0.png" xoffset -2 yoffset 10 }


Hope it helps you.

This post has been edited by Fox: 12 June 2012 - 05:11 AM

0

User is offline   Mark 

#840

Def files work for Erampage. I have added a new skybox, and a few new textures and models. In the RR folder I made a folder "highres" and put 2 folders inside of it "models" and "textures" and of course loaded my new textures and models in them.

I then made a redneck.def file in the RR folder. I didn't use the tilefromtexture command. My def lines look like this for textures.

texture 0028 { pal 0 { file "highres/textures/0028.png" } }
In my case I re-named my new textures to match up with the originals. Thats why its called 0028.png but you can use whatever name you want. I didn't have to add the include line in a con file. I'm pretty sure redneck.def is read by default

This post has been edited by Marked: 12 June 2012 - 02:28 PM

0

Share this topic:


  • 119 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