SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing > Editing Help

Reply
 
Thread Tools Search this Thread
Old 09-08-2014   #41
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

Well, back to the drawing board again. After a recent testing session, I discovered that the hanger doesn't let people hang on it. Instead of being in the code, I'm thinking that this is a problem with the Brak Eggman Missile itself. Does it need to be marked as a projectile to be hangable, or the state S_HANGON_2 to S_BLACKEGG_MISSILE?

Last edited by Prisima; 09-08-2014 at 11:19 PM.
Prisima is offline   Reply With Quote
Old 09-09-2014   #42
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

Giving the object an MF_MISSILE flag fixes the problem of it being hangable, but if you try to hang on it, it glitches with the console printing this:
Code:
WARNING: pickup+.wad|LUA_BODY:20: attempt to index field 'target' (a nil value)
Lua_Body:20 is this:
Code:
if not (actor.target.player.pflags & PF_ROPEHANG or actor.target.player.pflags & PF_ITEMHANG or actor.target.player.pflags & PF_CARRIED or actor.target.player.pflags & PF_GLIDING)
Prisima is offline   Reply With Quote
Old 04-23-2016   #43
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

This is now "Prisima's Lua Help" thread, because I don't want to flood the "Editing Help" subforum with small things.

Anyway, either this is a problem with SRB2 or a lack ofmy knowledge about Lua: I tried setting a player mobj's "x" and "y" coordinates manually, but was thrown an error by the console telling me to use P_TeleportMove, P_Move, or P_TryMove; yet, when I try those, it locks the player's angle and I cannot change it by the left/right keys, nor by setting it manually. Could someone clear this up for me?
Prisima is offline   Reply With Quote
Old 04-23-2016   #44
742mph
My work is never done yet
 
742mph's Avatar
Default

Are you calling P_TeleportMove, etc. every tic?
__________________
Quote:
<Evilgasm> the opposite of egoraptor is Toa Tahu
742mph is offline   Reply With Quote
Old 04-24-2016   #45
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

Quote:
Originally Posted by 742mph View Post
Are you calling P_TeleportMove, etc. every tic?
Yes, I am calling it every tic. The player still travels/teleport to wherever I want him to, but cannot change angle while teleporting.
Prisima is offline   Reply With Quote
Old 04-24-2016   #46
742mph
My work is never done yet
 
742mph's Avatar
Default

Quote:
Originally Posted by Prisima the Fox View Post
Yes, I am calling it every tic. The player still travels/teleport to wherever I want him to, but cannot change angle while teleporting.
That might be the problem, then. P_TeleportMove is intended for one-time use, like when a player enters a teleporter sector, instantaneously appears somewhere else, and can move freely after that. What are you trying to use it for, anyway? Whatever it is might be more easily achieved by modifying momx/momy/momz rather than position directly.
__________________
Quote:
<Evilgasm> the opposite of egoraptor is Toa Tahu
742mph is offline   Reply With Quote
Old 04-26-2016   #47
Prisima
*audible scribbling noises*
 
Prisima's Avatar
Default

The function issue was a red herring: the real culprit was code in the source code that did stuff with players being other players' tracers. I've got this problem fixed, but thanks for the help! (If anyone else has this problem, don't set a player to another player's tracer if the pther player's frame is S_PLAY_CARRY.)
Prisima is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.