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

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

  • 85 Pages +
  • « First
  • 71
  • 72
  • 73
  • 74
  • 75
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 Scripting  "CON coding help"

#2161

I have a counter decrementing when a condition is met. However, if I set the counter to be a gamevar with a flag 0 instead of 1 or 2, it decrements exactly twice as fast, how come?????

This post has been edited by thisbecasper: 25 November 2017 - 09:40 AM

0

User is offline   Daedolon 

  • Ancient Blood God

#2162

0 is a global value, so without seeing the code, sounds like you have two things changing the value.
0

User is online   Fox 

  • Fraka kaka kaka kaka-kow!

#2163

It's hard to tell without seeing the code. It may be incidental, something unrelated, etc.
0

#2164

I've got it to work now - another thing: Is there a way to reset the game automatically when a condition is met?
0

User is online   Trooper Dan 

  • Duke Plus Developer

#2165

View Postthisbecasper, on 26 November 2017 - 09:06 AM, said:

I've got it to work now - another thing: Is there a way to reset the game automatically when a condition is met?


That depends on what you mean by "reset the game". There is of course the resetplayer command, which has been around since 1996.
0

#2166

View PostTrooper Dan, on 26 November 2017 - 03:09 PM, said:

That depends on what you mean by "reset the game". There is of course the resetplayer command, which has been around since 1996.

It have some multiplayer code that works like "search and destroy" from the CoD-series. Simply put, it's 1v1, and when one dies the other "wins" the game/round, the game should start over. Same spawns, same values on gamevars etc.
0

User is online   Fox 

  • Fraka kaka kaka kaka-kow!

#2167

Use "startlevel VOLUME LEVEL".

This post has been edited by Fox: 26 November 2017 - 05:00 PM

2

#2168

View PostFox, on 26 November 2017 - 04:59 PM, said:

Use "startlevel VOLUME LEVEL".

Thanks, it's perfect - idk why I've never stumbled upon that command... :)
0

#2169

How come, even though runspeed is set to 0, you are able to move slowly and oddly, if you crouch and try to move? How can I prohibit all movement in the plane? Also, if you setvar RETURN -1 onevent crouch, youd still be able to move slowly and weird when trying to move while crouching, when movespeed is set to 0

This post has been edited by thisbecasper: 27 November 2017 - 03:25 AM

0

#2170

View PostFox, on 26 November 2017 - 04:59 PM, said:

Use "startlevel VOLUME LEVEL".

I further tested the implementation, but it acts weird... When I respawn due to the startlevel command, it kinda loads the map, but with me in it standing still - while I can move around in the new map. When the map reloads I can shoot myself if I shoot at the place I spawn, also I can jump on top of myself. I'm invisible btw...

EDIT: FIXED

This post has been edited by thisbecasper: 27 November 2017 - 03:15 AM

0

#2171

Do any of you know how to disable the drawing of the name of the map you enter in the beginning of a level? And is there a way to enable/disable coopview?

This post has been edited by thisbecasper: 27 November 2017 - 05:34 AM

0

#2172

View PostFox, on 26 November 2017 - 04:59 PM, said:

Use "startlevel VOLUME LEVEL".

Startlevel freezes the games when triggered in an online game. Workaround?
0

User is online   Mark 

  • Honored Donor

#2173

How about triggering "end of level" first. Or does that act screwy in MP mode? Or mess up the restart with your vars set right?
0

User is online   Fox 

  • Fraka kaka kaka kaka-kow!

#2174

View Postthisbecasper, on 27 November 2017 - 09:31 AM, said:

Startlevel freezes the games when triggered in an online game. Workaround?

Multiplayer is unfinished in Eduke32. So you are kinda of asking how to install a ceiling lamp in a house without a roof.
0

#2175

View PostMark., on 27 November 2017 - 11:51 AM, said:

How about triggering "end of level" first. Or does that act screwy in MP mode? Or mess up the restart with your vars set right?

I can use savemapstate and loadmapstate just fine, my only target is an auto reset level... I will look into an end of level triggering - how would you do that though?
Is there a way to use consolecommands, without typing themselves? OR maybe I could just use save and loadmapstate and afterwards tp both players to a coordinate, even though that sounds difficult.

This post has been edited by thisbecasper: 27 November 2017 - 02:29 PM

0

#2176

View PostFox, on 27 November 2017 - 01:18 PM, said:

Multiplayer is unfinished in Eduke32. So you are kinda of asking how to install a ceiling lamp in a house without a roof.

That's true. Although I'm using the old mp build, and everything I've done so far (which is quite a lot) have been working just fine until now...
0

User is online   Fox 

  • Fraka kaka kaka kaka-kow!

#2177

If I recall, startlevel didn't worked in multiplayer in older versions either.

This post has been edited by Fox: 27 November 2017 - 01:51 PM

0

#2178

It would be a great help if someone could say if there's a fix or not to these problems:
How to reset the level in multiplayer (might not work).
How to make a player respawn when a condition is met, or do something similar to setting dead_flag 0, which doesn't work anymore.
I would love to have the player, dead or alive, respawn (or whatever), in a specifik place. I can use set pos x,y,z so it's only the dead/alive thing which is the problem :)

This post has been edited by thisbecasper: 28 November 2017 - 07:52 AM

0

User is online   Fox 

  • Fraka kaka kaka kaka-kow!

#2179

Can you not kill the player by setting the health to zero?

You may try setting player[THISACTOR].gm to 8 for all players to end the level.
0

#2180

View PostFox, on 28 November 2017 - 08:13 AM, said:

Can you not kill the player by setting the health to zero?

You may try setting player[THISACTOR].gm to 8 for all players to end the level.

I dont know if you've misunderstood me or vice versa...
I'm not interested in killing the player, I'm interested in setting the player alive again OR make him respawn automatically, he should not be able to respawn manually.
setplayer[THISACTOR].gm 8/32 works in singleplayer but not in multiplayer - acts the same way in call cases, just freezes with a picture of duke.
I have a countdown, and when it reaches 0 I simply call the above setter, idk why that shouldn't work, if it's possible at all. Other suggestions? heheh heh heh... :')
- Is it possible to code something into APLAYER that makes the person alive again if health is added when health < 1? The revive mechanism works when dncornholio is used, so I can't see what should prevent the revive thingy to be pulled off...

I've achieved something nice by actually adding health back to the player... my mistake.

This post has been edited by thisbecasper: 28 November 2017 - 09:24 AM

0

#2181

View Postthisbecasper, on 28 November 2017 - 09:08 AM, said:

I dont know if you've misunderstood me or vice versa...
I'm not interested in killing the player, I'm interested in setting the player alive again OR make him respawn automatically, he should not be able to respawn manually.
setplayer[THISACTOR].gm 8/32 works in singleplayer but not in multiplayer - acts the same way in call cases, just freezes with a picture of duke.
I have a countdown, and when it reaches 0 I simply call the above setter, idk why that shouldn't work, if it's possible at all. Other suggestions? heheh heh heh... :')
- Is it possible to code something into APLAYER that makes the person alive again if health is added when health < 1? The revive mechanism works when dncornholio is used, so I can't see what should prevent the revive thingy to be pulled off...

I've achieved something nice by actually adding health back to the player... my mistake.


This sh*t won't work... setactor[THISACTOR].extra 10 works if theres only one player in the game, if theres two i just get kinda squished instantly, doesnt do anything. Can it really be that it is impossible to auto respawn, auto restart map or revive players?
0

#2182

View Postthisbecasper, on 28 November 2017 - 11:47 AM, said:

This sh*t won't work... setactor[THISACTOR].extra 10 works if theres only one player in the game, if theres two i just get kinda squished instantly, doesnt do anything. Can it really be that it is impossible to auto respawn, auto restart map or revive players?

I've been able to solve the problem now, kinda. The problem was that loadmapstate and setting players extra was done in the same tick.
0

User is offline   spacekebab 

#2183

What would be the best way to get blood splatter on screen? I can't, for the life of me, get it to "stop" correctly or start again if I do - don't really know how to use 'rotatesprite' or if it's my only option. Thanks for any ideas!


onevent EVENT_DISPLAYREST

ifvare BLOODTEMP 1 {
setvarvar xdimminus xdim
subvar xdimminus 1
setvarvar ydimminus ydim
subvar ydimminus 1
rotatespritea 160 100 65536 0 BLOODSCREEN 0 0 8 BLOODTRANS 0 0 xdimminus ydimminus
}



https://i.imgur.com/gT5gjTS.gif

This post has been edited by spacekebab: 28 November 2017 - 09:23 PM

1

User is offline   Striker 

  • Auramancer

#2184

View Postspacekebab, on 28 November 2017 - 09:22 PM, said:

What would be the best way to get blood splatter on screen? I can't, for the life of me, get it to "stop" correctly or start again if I do - don't really know how to use 'rotatesprite' or if it's my only option. Thanks for any ideas!


onevent EVENT_DISPLAYREST

ifvare BLOODTEMP 1 {
setvarvar xdimminus xdim
subvar xdimminus 1
setvarvar ydimminus ydim
subvar ydimminus 1
rotatespritea 160 100 65536 0 BLOODSCREEN 0 0 8 BLOODTRANS 0 0 xdimminus ydimminus
}

 
Make a var for a counter, increment it while displaying blood, set bloodtemp to 0 when the counter reaches a value you want. As for the animation, don't use ART tile animations, they always loop. Set the tile used by rotatesprite based on the value of the counter var you make.

This post has been edited by Striker: 29 November 2017 - 01:06 AM

0

User is offline   spacekebab 

#2185

Got stuck trying to animate it in a while loop but dropped that in favor of ifvarn and finally got it! thank you Striker
0

User is offline   Jblade 

#2186

Is there a reason why PROJ_OFFSET wouldn't work? I'm setting it to what the wiki says to, 14354, to make the projectile centred but it just flat out doesn't work. I've even tried setting it via setprojectile before shooting and it still spawns in the default position.
0

User is online   Mark 

  • Honored Donor

#2187

Jblade's question got me thinking about something. If I were to reduce the speed of say the RPG projectile to very slow, have autoaiming on while playing and fire when the enemy is in my crosshair, would the projectile follow the enemy until it hit or does it still go to the spot on the map where the crosshair was at firing time?

Which got me to thinking again about if the new "follow the player" AI that Trooper Dan is working on could be adapted to a projectile. It would be cool to be able to hit an enemy even if they duck around a corner. ;) Although that might only be useful in a MP game since most regular enemies don't run away.

This post has been edited by Mark.: 04 December 2017 - 11:16 AM

0

User is online   Trooper Dan 

  • Duke Plus Developer

#2188

View PostMark., on 04 December 2017 - 11:06 AM, said:

Jblade's question got me thinking about something. If I were to reduce the speed of say the RPG projectile to very slow, have autoaiming on while playing and fire when the enemy is in my crosshair, would the projectile follow the enemy until it hit or does it still go to the spot on the map where the crosshair was at firing time?


Angle and velocity is determined at the time a projectile is fired -- projectiles do not track unless you have explicitly added code to make them do so. The way it works by default is that the horizontal speed (the xvel value in the sprite struct) is held to a constant value, and then zvel is set to whatever value will make the projectile travel at the desired z-angle. The steeper the up/down slope, the faster the projectile actually ends up moving. RPG is hardcoded to have a horizontal speed of 644.


View PostMark., on 04 December 2017 - 11:06 AM, said:

Which got me to thinking again about if the new "follow the player" AI that Trooper Dan is working on could be adapted to a projectile. It would be cool to be able to hit an enemy even if they duck around a corner. ;) Although that might only be useful in a MP game since most regular enemies don't run away.


For that type of tracking you don't need any sophisticated pathfinding -- I suggest using breadcrumb style tracking. It would be appropriate for a walking spider-bomb or something similar.
1

#2189

I'm just getting back it to modding eduke32 and con coding.There use to be a notepad++ con syntax highlighters here https://forums.duke4...x-highlighters/ but the link is dead.


I was wondering if anyone has anything like that for con codding with notepad++?

Also what programs are you highly skilled con coders using? Is notepad++ still a good choice?
0

User is online   Mark 

  • Honored Donor

#2190

Notepad ++ is what I use.

con highlighting file

https://www.dropbox....gwhite.xml?dl=0

This post has been edited by Mark.: 16 December 2017 - 04:46 PM

1

Share this topic:


  • 85 Pages +
  • « First
  • 71
  • 72
  • 73
  • 74
  • 75
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Fury! ;) © 2019 Voidpoint, LLC

Enter your sign in name and password


Sign in options