
EDuke32 Scripting "CON coding help"
#2161 Posted 25 November 2017 - 09:33 AM
This post has been edited by thisbecasper: 25 November 2017 - 09:40 AM
#2162 Posted 25 November 2017 - 10:09 AM
#2163 Posted 25 November 2017 - 11:35 AM
#2164 Posted 26 November 2017 - 09:06 AM
#2165 Posted 26 November 2017 - 03:09 PM
thisbecasper, on 26 November 2017 - 09:06 AM, said:
That depends on what you mean by "reset the game". There is of course the resetplayer command, which has been around since 1996.
#2166 Posted 26 November 2017 - 03:47 PM
Trooper Dan, on 26 November 2017 - 03:09 PM, said:
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.
#2167 Posted 26 November 2017 - 04:59 PM
This post has been edited by Fox: 26 November 2017 - 05:00 PM
#2168 Posted 27 November 2017 - 01:37 AM
Fox, on 26 November 2017 - 04:59 PM, said:
Thanks, it's perfect - idk why I've never stumbled upon that command...

#2169 Posted 27 November 2017 - 02:52 AM
This post has been edited by thisbecasper: 27 November 2017 - 03:25 AM
#2170 Posted 27 November 2017 - 03:01 AM
Fox, on 26 November 2017 - 04:59 PM, said:
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
#2171 Posted 27 November 2017 - 04:43 AM
This post has been edited by thisbecasper: 27 November 2017 - 05:34 AM
#2172 Posted 27 November 2017 - 09:31 AM
Fox, on 26 November 2017 - 04:59 PM, said:
Startlevel freezes the games when triggered in an online game. Workaround?
#2173 Posted 27 November 2017 - 11:51 AM
#2174 Posted 27 November 2017 - 01:18 PM
thisbecasper, on 27 November 2017 - 09:31 AM, said:
Multiplayer is unfinished in Eduke32. So you are kinda of asking how to install a ceiling lamp in a house without a roof.
#2175 Posted 27 November 2017 - 01:39 PM
Mark., on 27 November 2017 - 11:51 AM, said:
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
#2176 Posted 27 November 2017 - 01:41 PM
Fox, on 27 November 2017 - 01:18 PM, said:
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...
#2177 Posted 27 November 2017 - 01:51 PM
This post has been edited by Fox: 27 November 2017 - 01:51 PM
#2178 Posted 28 November 2017 - 07:51 AM
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
#2179 Posted 28 November 2017 - 08:13 AM
You may try setting player[THISACTOR].gm to 8 for all players to end the level.
#2180 Posted 28 November 2017 - 09:08 AM
Fox, on 28 November 2017 - 08:13 AM, said:
You may try setting player[THISACTOR].gm to 8 for all players to end the level.
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
#2181 Posted 28 November 2017 - 11:47 AM
thisbecasper, on 28 November 2017 - 09:08 AM, said:
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?
#2182 Posted 28 November 2017 - 01:25 PM
thisbecasper, on 28 November 2017 - 11:47 AM, said:
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.
#2183 Posted 28 November 2017 - 09:22 PM
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 }

This post has been edited by spacekebab: 28 November 2017 - 09:23 PM
#2184 Posted 29 November 2017 - 01:06 AM
spacekebab, on 28 November 2017 - 09:22 PM, said:
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 }
This post has been edited by Striker: 29 November 2017 - 01:06 AM
#2185 Posted 03 December 2017 - 12:50 AM
#2186 Posted 04 December 2017 - 08:36 AM
#2187 Posted 04 December 2017 - 11:06 AM
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.

This post has been edited by Mark.: 04 December 2017 - 11:16 AM
#2188 Posted 04 December 2017 - 08:07 PM
Mark., on 04 December 2017 - 11:06 AM, said:
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.
Mark., on 04 December 2017 - 11:06 AM, said:

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.
#2189 Posted 16 December 2017 - 03:33 PM
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?
#2190 Posted 16 December 2017 - 04:45 PM
This post has been edited by Mark.: 16 December 2017 - 04:46 PM