Danukem, on 05 March 2021 - 11:35 AM, said:
A really simple way to do what you want would be to make a separate actor for each individual record and have them spread across a table with the record player in the middle. The player would walk up to the record they want to play, then the record would be an actor with code something like:
useractor notenemy RECORD1 0
ife RECORD1UNLOCK YES
{
cstat 32
ifp palive ifp pfacing ifpdistl 1280 ifhitspace ifcansee
{
stopsound REC2SOUND stopsound REC3SOUND
soundonce REC1SOUND
}
enda
You would make the record sprites start as invisible in mapster, and define the sounds with a large radius so that they seemed to emanate from the entire room. You would declare a global var for each variable (RECORD1UNLOCK, RECORD1UNLOCK, etc) and set them to NO (NO = 0, YES = 0). Then all you have to do code some things in the game to make them turn to YES.
right now i have one record on the gramophone player, the actor has a few tracks you can go to by pressing space, i have it set up like this.
action RECORDTRACK1 0 1 1 1 8
action RECORDTRACK2 0 1 1 1 8
action RECORDTRACK3 0 1 1 1 8
action RECORDTRACK4 0 1 1 1 8
action RECORDSTOPPED 0 1 1 1 8
move RECORDSPINNING 0 0
move RECORDSTOPSPINNING 0 0
useractor notenemy RECORDS 0 RECORDTRACK1
ifaction RECORDTRACK1
{
soundonce BONUSMUSIC
move RECORDSPINNING spin
// ifactioncount 8 action RECORDTRACK1
ifpdistl 2048
ifp palive
ifcansee
ifhitspace
{
ifactioncount 4
action RECORDSTOPPED
}
}
else
ifaction RECORDSTOPPED
{
move RECORDSTOPPED stopsound BONUSMUSIC
ifpdistl 2048
ifp palive
ifcansee
ifhitspace
{
ifactioncount 4
action RECORDTRACK1
}
}
enda
this way i can just make new actions for each track it has to play, and eventually either stop, like i have now, or loop back to track 1
note, the actor is set relative to the floor, so it is flat and spins right round like a record baby.

Help
Duke4.net
DNF #1
Duke 3D #1









