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

Jump to content

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

EDuke32 Scripting  "CON coding help"

User is offline   Diaz 

#781

Hmmm... I use ifvaror on some parts of my code and it seems to work..
0

#782

I always forget what those, and, xor things does. Would be nice if someone could write something on the wiki, the wiki isn't very helpful right now. But ifvarand works for me when i check if a bit number is on.
0

User is offline   Superthijs 

#783

Thank you guys! :)
0

User is offline   Superthijs 

#784

I have another question: Doesn't 'ifcount' work inside an event?
I'm using this code to simulate jetpack flames, but it doesn't wait between the spawning of the flames.
After half a second, the game crashes showing the 'too many sprites spawned' message. <_<

onevent EVENT_GAME
    ifp pjetpack
    {
        ifcount 2
        {
            espawn EXPLOSION2
            setactor[RETURN].xrepeat 16
            setactor[RETURN].yrepeat 16
            resetcount
        }
    }
endevent


I have the feeling I'm doing something wrong.
Any ideas?

This post has been edited by Superthijs: 12 April 2012 - 04:10 AM

0

User is offline   Diaz 

#785

ifcount is an actor counter. That code should go inside the APLAYER actor code instead of EVENT_GAME.
0

#786

You can also put a ifactor APLAYER command so only the APLAYER will spawn it. Though i am not sure if this will work because of the count thing. But i want to know <_<

This post has been edited by rasmus thorup: 12 April 2012 - 05:31 AM

0

User is offline   Superthijs 

#787

Thanks!
0

User is offline   Superthijs 

#788

Sorry, I'm just overloaded with questions... <_<
How do I make an actor shoot a projectile with another vertical angle? I've managed to make it shoot towards where the player is looking at,
but it keeps shooting at the same vertical angle. Even when the player looks up or down.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #789

zshoot
0

User is offline   Mblackwell 

  • Evil Overlord

#790

View PostSuperthijs, on 12 April 2012 - 09:00 AM, said:

Sorry, I'm just overloaded with questions... <_<
How do I make an actor shoot a projectile with another vertical angle? I've managed to make it shoot towards where the player is looking at,
but it keeps shooting at the same vertical angle. Even when the player looks up or down.


In addition to what Hendricks said, if you know your target:

http://wiki.eduke32....or_aim_vertical
0

User is offline   Superthijs 

#791

I don't have a specific target, I just want it to shoot freely.
0

User is offline   Superthijs 

#792

So how do I get the player's vertical angle, just like a sector slope (e.g. 4096)?
0

#793

Do you mean this? http://wiki.eduke32.com/wiki/Horiz
Someone messed up.
0

User is offline   sedition 

#794

Is there a special editor for EDuke-Scripting? I´m working with Notepad++, but I was wondering if there´s a special one which works better with Con-Scripting.
0

#795

No. that's what most of us use.
0

User is offline   Superthijs 

#796

View Postrasmus thorup, on 13 April 2012 - 10:16 AM, said:

Do you mean this? http://wiki.eduke32.com/wiki/Horiz
Someone messed up.


Yeah, I think that's what I need. But how do I convert the 'horiz' number to a slope value, e.g. 4096?
0

#797

I don't know the values for horiz and zshoot. You should be able to test that yourself. Do you know how to display numbers on screen?
0

User is offline   Helixhorned 

  • EDuke32 Developer

#798

View PostSuperthijs, on 14 April 2012 - 07:29 AM, said:

Yeah, I think that's what I need. But how do I convert the 'horiz' number to a slope value, e.g. 4096?

Subtract 100, multiply with 32 (= 4096/128).
0

User is offline   m210® 

#799

Mapster32 and hard-code have a very good command - alignflorslope,but in con-code I must writing:
getflorzofslope sectnum x y z 
getsector[sect2].floorz z2
subvarvar z z2
divvar z 2
setsector[sect2].floorslope z

And this code works slowly with the formation of gap. Any ideas for fix it? <_<

Second question - How can I get a level name and show this on display?

This post has been edited by M210: 15 April 2012 - 01:07 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#800

I don't know, what exactly alignflorslope does?
0

User is offline   Hendricks266 

  • Weaponized Autism

  #801

View PostM210, on 15 April 2012 - 01:06 PM, said:

Second question - How can I get a level name and show this on display?

qgetsysstr
0

User is offline   m210® 

#802

View PostFox, on 15 April 2012 - 10:31 PM, said:

I don't know, what exactly alignflorslope does?

It get floor slope (like floor vertical angle) to a given value of z coordinate.
If z coordinate is changing by moving sector, my code no time to determine the exact position and the gap is obtained.



View PostHendricks266, on 15 April 2012 - 10:37 PM, said:


Thanks a lot <_<

This post has been edited by M210: 15 April 2012 - 11:07 PM

0

User is offline   m210® 

#803

Mapster32:

Quote

Line 139, setvar: sprite structure member `statnum' is read-only.

It's not a read-only value! And I not want to set statnum = 14 manually. What can I do else?
0

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

Share this topic:


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