| Apr 26, 2025, 01:31 PM | ||
|
a new onDraw variant for jjBEHAVIORINTERFACE
Unsure how the onDraw(jjOBJ@ obj) hook works internally and if it's possible to have a variant that accepts a second parameter of "jjPLAYER@ play" so you can specify how differently it should draw for a specific player, similar to how the PU blaster monitors and the fast fire pickups work
Example: Quote:
__________________
. |
||
| Apr 27, 2025, 03:11 AM | |
|
All jjDraw* functions take an optional playerID argument that can be used to specify which player the sprite should be drawn for (the default of -1 denoting all). This already enables patterns such as
Code:
void onDraw(jjOBJ@ obj) {
for (int i = 0; i < jjLocalPlayerCount; i++) {
const auto@ player = jjLocalPlayers[i];
// draw the sprite facing the player's direction instead of the object's
jjDrawSpriteFromCurFrame(obj.xPos, obj.yPos, obj.curFrame,
player.direction, playerID: player.playerID);
}
}
__________________
I am an official JJ2+ programmer and this has been an official JJ2+ statement. |||||||||||||||||||||||||||||||||||||||||||||||||| |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
All times are GMT -8. The time now is 08:37 AM.
Jazz2Online © 1999-INFINITY (Site Credits). Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats. Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Original site design by Ovi Demetrian. DrJones is the puppet master. Eat your lima beans, Johnny.




