It is currently 23 May 2013, 06:20

Post new topic Reply to topic  Page 2 of 2
 [ 15 posts ]    1, 2

[SUBMISSION] Familiar Summon


Author Message
 Post subject: Re: Familiar Summon
PostPosted: 31 Aug 2012, 08:11 
Offline
Cyberdemon  Approved Adder
User avatar
Joined: 01 Feb 2011, 20:07
Posts: 858
MagicWazard wrote:
That's not a bad idea, but I'd rather not have two of the "same" icon in the WAD.
If TEXTURES was allowed (actually I don't know if it is allowed or not. But I presume it is not), you could do that without adding copies of the same graphics, if you're concerned about the size of the file.


Top
 Profile  
 
 Post subject: Re: Familiar Summon
PostPosted: 31 Aug 2012, 22:29 
Offline
Site Admin  Site Admin
Joined: 19 Jan 2010, 00:05
Posts: 1546
It definitely is allowed. It has no reason to be disallowed.
I want YOU to read the wiki.
And this one too. Also, SLADE3.


Top
 Profile  
 
 Post subject: Re: Familiar Summon
PostPosted: 01 Sep 2012, 01:46 
Offline
Hades Elemental  Some Kind of Monster
User avatar
Joined: 20 Feb 2012, 21:52
Posts: 349
Location: Southern California
Well, although that's a nice trick, I'm not sure it's worth it in this particular case, since that would involve writing a whole new lump just to manage one image file. It would probably be more work for the end-user to implement the contents of the TEXTURES lump into their project than it would be to simply copy the icon and modify its offsets based off the notes in the DECORATE lump--if nothing else, it would be a layer of obfuscation that seems unnecessary. If there was a lot of images that all needed custom offsets, that would be one thing, but for one icon, that seems like overkill. Still, it's good to know that it's an option...
Co-founder of Awesome Towne, an indie game studio--come visit our website!


Top
 Profile  
 
 Post subject: Re: Familiar Summon
PostPosted: 24 Apr 2013, 14:03 
Offline
Cyberdemon  Approved Adder
User avatar
Joined: 01 Feb 2011, 20:07
Posts: 858
I found a little issue with this: If you're standing very close to a wall (hugging the wall), and you use the item, the creature successfully spawns, but you two become stuck in each other and are unable to move.

Now, this could be put as "don't do it", but still, I think it's better to address it while we can. And I happen to come up with a solution, which seems to work well enough for the case at hand:

Code:
  Death:
    FAMS AA 4 bright
  SpawnCheck:
    FAMS A 4 bright
    TNT1 A 0 A_JumpIfCloser(40, "SpawnCheck")
    TNT1 A 0 A_SpawnItemEx("Familiar", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx("FamiliarSmoke", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    Stop

The above code is for the FamiliarSummonThrown actor (i.e the projectile thrown by the player upon the item's use). It checks the distance between you, the player, and itself. If it's safe to spawn the familiar, then it does so. Otherwise, it keeps on checking until it's.


Top
 Profile  
 
 Post subject: Re: Familiar Summon
PostPosted: 24 Apr 2013, 19:25 
Offline
Hades Elemental  Some Kind of Monster
User avatar
Joined: 20 Feb 2012, 21:52
Posts: 349
Location: Southern California
Blue Shadow wrote:
I found a little issue with this: If you're standing very close to a wall (hugging the wall), and you use the item, the creature successfully spawns, but you two become stuck in each other and are unable to move.

Now, this could be put as "don't do it", but still, I think it's better to address it while we can. And I happen to come up with a solution, which seems to work well enough for the case at hand:

Code:
  Death:
    FAMS AA 4 bright
  SpawnCheck:
    FAMS A 4 bright
    TNT1 A 0 A_JumpIfCloser(40, "SpawnCheck")
    TNT1 A 0 A_SpawnItemEx("Familiar", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    TNT1 A 0 A_SpawnItemEx("FamiliarSmoke", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    Stop

The above code is for the FamiliarSummonThrown actor (i.e the projectile thrown by the player upon the item's use). It checks the distance between you, the player, and itself. If it's safe to spawn the familiar, then it does so. Otherwise, it keeps on checking until it's.


Good call; I think "don't do it" is never an acceptable workaround for troublesome behavior. In testing, I had always found that if you got stuck, it was only momentarily, as the Familiar would start moving, causing you to be freed, but that seems not to always be the case. I guess if you're REAL close, you overlap too much, and are pretty much stuck until you beat him to death to free yourself. I added in your check which fixes the issue, and updated the submission in the original link.


Top
 Profile  
 
Display posts from previous:  Sort by  
Moderator: Dreadopp

Post new topic Reply to topic  Page 2 of 2
 [ 15 posts ]    1, 2


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: