Jump to content
  • 0

Trails


SupremeBioVizier

Question

Last night I tried to write script for decorate lump on the hopes, where ever the player moves an image of the player sprite remains... didn't work. Anyone know if this can be done using decorate? I'm trying not to use acs script.

Share this post


Link to post

13 answers to this question

Recommended Posts

  • 0

actor PlayerTrail : Actor 75675
{
    Height 16
    Radius 16
    +NOGRAVITY
    States
    {
    Spawn:
        TRAI A 1
        TRAI B 1
        TRAI C 1
        Stop
    }
}

actor PlayerTrailSpawner : Actor
{
    States
    {
    Spawn:
        TNT1 A 0 A_SpawnItemEx("PlayerTrail", 0, 0, 0, 0, 0, 0, 0, SXF_SETMASTER)
        Loop
    }
}
 

it says error while parsing....it shows up on inventory at least

Share this post


Link to post
  • 0

Can you copy paste the error?
Best guess I have is that there is a space spawning error of some sort.

Possibly adding +NOBLOCKMAP might help, as well as adding the NoCheckPosition to it.

("PlayerTrail", 0, 0, 0, 0, 0, 0, 0, SXF_SETMASTER | SXF_NOCHECKPOSITION)

Edited by Desfar

Share this post


Link to post
  • 0

actor PlayerTrail : Actor 3505
{
    Height 16
    Radius 16
    +NOGRAVITY
    +NOBLOCKMAP
    States
    {
    Spawn:
        TRAI A 1
        TRAI B 1
        TRAI C 1
        Stop
    }
}

actor PlayerTrailSpawner : Actor
{
    States
    {
    Spawn:
        TNT1 A -1 A_SpawnItemEx("PlayerTrail", -16, 0, 8, 0, 0, 0, 0, SXF_SETMASTER|SXF_TRANSFERPOINTERS)
    }
}

 

^ exactly whats in the decorate now, it passed the parsing and shows up in the things decorate folder in slade

///////////////////////////

would I need to define the sprite in this decorate as well?

(what goes here)

{
    TRAI A 0
    {
        Offset 0, 0
        Patch TRAILA, 0, 0
    }
    TRAI B 0
    {
        Offset 0, 0
        Patch TRAILB, 0, 0
    }
    TRAI C 0
    {
        Offset 0, 0
        Patch TRAILC, 0, 0
    }
}
/////////////

sprite does not show when I turn around, should there just be one png titled traia0?

Edited by SupremeBioVizier

Share this post


Link to post
  • 0
3 hours ago, Desfar said:

Would you mind posting a small wad sample I can tinker with?

https://www.mediafire.com/file/xdjg3bbzqkhou8x/F-ZEROBETA.wad/file

here is a ruff draft of the idea I want to work on....I thought it would be cool for the cars or at least, player1 for nows hud car to leave trails behind so when you look back, there's just fading ghost images of the player

Share this post


Link to post
  • 0

FOUND IT!

while you made the spawner, you never set the player to generate the item.

 

ACTOR FastDoomPlayer : DoomPlayer
{
  Player.ForwardMove 3.2, 3.2  // Increase forward movement speed
  Player.SideMove 4.2, 4.2  // Increase sidestep speed
  
  States
  {
  Spawn:
    PLAY A -1
    Loop
  See:
    PLAY ABCD 1 A_SpawnItemEx("PlayerTrail", -16, 0, 8, 0, 0, 0, 0, SXF_SETMASTER|SXF_TRANSFERPOINTERS)
    Loop

  }
}

This will require finetuning, but this will make it so the player is spawning a trail MOB every tic.
Transparency for the trail will also be a must. 
The wad blew my mind when i cracked it open love the work!

Edited by Desfar

Share this post


Link to post
  • 0

Also, i would consider making it so the spawner isnt a -1

 

such as


actor PlayerTrailSpawner : Actor
{
    States
    {
    Spawn:
        TNT1 A 1 A_SpawnItemEx("PlayerTrail", -16, 0, 8, 0, 0, 0, 0, SXF_SETMASTER|SXF_TRANSFERPOINTERS)
    }
}

Share this post


Link to post
  • 0
18 hours ago, Desfar said:

 

it is still not showing. I tried changing a few things but nothing worked, so this is how the script was + now with the player spawner you made

//////////////////////////

actor PlayerTrail : Actor 3505
{
    Height 16
    Radius 16
    +NOGRAVITY
    +NOBLOCKMAP
    States
    {
    Spawn:
        TRAI A 1
        TRAI B 1
        TRAI C 1
        Stop
    }
}

actor PlayerTrailSpawner : Actor
{
    States
    {
    Spawn:
        TNT1 A 1 A_SpawnItemEx("PlayerTrail", -16, 0, 8, 0, 0, 0, 0, SXF_SETMASTER|SXF_TRANSFERPOINTERS)
    }
}

ACTOR FastDoomPlayer : DoomPlayer
{
  Player.ForwardMove 3.2, 3.2  // Increase forward movement speed
  Player.SideMove 4.2, 4.2  // Increase sidestep speed
  
  States
  {
  Spawn:
    PLAY A -1
    Loop
  See:
    PLAY ABCD 1 A_SpawnItemEx("PlayerTrail", -16, 0, 8, 0, 0, 0, 0, SXF_SETMASTER|SXF_TRANSFERPOINTERS)
    Loop

  }
}

Share this post


Link to post
  • 0

So what i did for my test was to make the player trail loop, and i believe the WAD doesnt have TRAI B or TRAI C.
Slap those in, and set it to loop as a test.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...