Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #21  
Old 03-12-2018, 05:49 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,652
Dinocanid is on a distinguished road
Default

You could use variables in the image url, so it fetches the proper species type. For example:
Quote:
'http://YOURSITE.com/picuploads/pet_images/{$pet->type}/markings/somemarking.png',
You could create two separate folders for snakes and lizards, but the subfolder names would remain the same. If you don't want to mix up markings by naming them the same thing in both directories, you could label them "snake-stripes1.png" and "lizard-stripes1.png", then you can do this:
PHP Code:
'http://YOURSITE.com/picuploads/pet_images/{$pet->type}/markings/' $pet->type '-stripes1.png'.png', 
If you want to go further and grab a different marking based on the level of a pet (assuming it has a baby stage, etc.), then you can replace "$pet->age" with "$pet->currentlevel", and then change the if statement accordingly. So:
PHP Code:
if($pet->currentlevel >= 1){
//image array for baby pets goes here...

__________________

Last edited by Dinocanid; 03-12-2018 at 05:52 PM.
Reply With Quote
  #22  
Old 03-12-2018, 07:51 PM
SyntaxError73's Avatar
SyntaxError73 SyntaxError73 is offline
Member
 
Join Date: Jun 2016
Posts: 8
Gender: Female
Credits: 2,175
SyntaxError73 is on a distinguished road
Default

Quote:
Originally Posted by Dinocanid View Post
You could use variables in the image url, so it fetches the proper species type. For example:


You could create two separate folders for snakes and lizards, but the subfolder names would remain the same. If you don't want to mix up markings by naming them the same thing in both directories, you could label them "snake-stripes1.png" and "lizard-stripes1.png", then you can do this:
PHP Code:
'http://YOURSITE.com/picuploads/pet_images/{$pet->type}/markings/' $pet->type '-stripes1.png'.png', 
If you want to go further and grab a different marking based on the level of a pet (assuming it has a baby stage, etc.), then you can replace "$pet->age" with "$pet->currentlevel", and then change the if statement accordingly. So:
PHP Code:
if($pet->currentlevel >= 1){
//image array for baby pets goes here...


Yes thank you! this will help a lot, since I am Planning on making marking sets for babies too, and of course multiple species types.

Last edited by SyntaxError73; 03-12-2018 at 07:51 PM. Reason: Stupid Typo
Reply With Quote
Reply

Thread Tools
Display Modes

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 -5. The time now is 02:27 PM.

Currently Active Users: 462 (0 members and 462 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636