Author Topic: ※ Danmakufu Q&A/Problem thread 3 ※  (Read 490055 times)

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #810 on: September 25, 2017, 03:34:10 AM »
Here's a curious question; has MKM fixed the alpha rendering in PH3 so that objects with less transparency in alpha rendering no longer get darker? Internally, in v1.2m, using ObjEffect_SetVertexcolor(obj, idx, rgba) multiplied the rgb by a factor of a. So in the shader, so we'd get something like: color.rgba = (color.a * color.rgb, color.a) // internally, rgba are values of 0-1.

Has this been fixed? I went to great lengths to do the color-correction last time, but I'm not sure if I want to make another minigame if it hasn't.
Also, what about the pixel-perfect issue? PLEASE tell me that was fixed too.
I.e. I want some of my bullets look like this:


And not have the the artifacts like I had in the past when rendering similar bullets:


Apologies if these questions seem a bit noobish. I haven't been active in the community for a long, long time.
I'm thinking of making another stage involving Halloween and some of the characters from IN and a haunted part of Eientei and wondering if it's still worth going for.

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #811 on: September 25, 2017, 05:01:32 AM »
Hello!
It's Dire again here. The wiki doesn't really have any tips on making a dialogue scene, so how do I do that? How does one go about making a dialogue scene in danmakufu?
Thanks!
The wiki won't necessarily have that information because there's no set framework for it. You draw the portraits and boxes and text and everything and that's just how it works. Typically you might set this up inside of a single script that you add to the boss plural as though it were an attack.

Here's a curious question; has MKM fixed the alpha rendering in PH3 so that objects with less transparency in alpha rendering no longer get darker? Internally, in v1.2m, using ObjEffect_SetVertexcolor(obj, idx, rgba) multiplied the rgb by a factor of a. So in the shader, so we'd get something like: color.rgba = (color.a * color.rgb, color.a) // internally, rgba are values of 0-1.
Note that this isn't strictly a mistake. What people expect when declaring alpha values is straight alpha blending, where rgb and alpha are uncorrelated, but vertex color filtering expects premultiplied alpha in order to compose it with other layers. It was a problem because you couldn't get around it just in scripts, whereas any modern API will be doing this for you when you supply the color values.

But yes you can just set alpha values independently now and it's fine.

Also, what about the pixel-perfect issue? PLEASE tell me that was fixed too.
I.e. I want some of my bullets look like this:


And not have the the artifacts like I had in the past when rendering similar bullets:
Yes, but I'm not sure to what extent you're looking for. Much of the interpolation issue for bullets is due to being rotated at arbitrary angles; this can be disabled by setting fixed_angle=true in your shot definition. I specifically asked for this to be implemented in order to fix this issue and it definitely helps.

However, there is also interpolation introduced from sprites not being drawn at exact integer bounds ("bounds" because sprites with an odd-sized width/height would have to be drawn at half-pixel positions). This is somewhat unavoidable of a conflict as you trade off precision for smoothness in motion. I have a solution for this if the pixel precision is absolutely needed, but it doesn't work for shot objects because there's no way to tell shot objects to render at a certain position without altering the "actual" position of the object. You can make the shots invisible and draw extra sprites, but obviously that is a very intensive workaround.
« Last Edit: September 25, 2017, 05:23:47 AM by Drake »

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #812 on: September 25, 2017, 05:52:37 AM »
It was a problem because you couldn't get around it just in scripts, whereas any modern API will be doing this for you when you supply the color values.

But yes you can just set alpha values independently now and it's fine.
Oh thank goodness! This is great news for me.

Yes, but I'm not sure to what extent you're looking for. Much of the interpolation issue for bullets is due to being rotated at arbitrary angles; this can be disabled by setting fixed_angle=true in your shot definition. I specifically asked for this to be implemented in order to fix this issue and it definitely helps.

However, there is also interpolation introduced from sprites not being drawn at exact integer bounds ("bounds" because sprites with an odd-sized width/height would have to be drawn at half-pixel positions).
Oh wow, thanks for making that suggestion. I remember reaching out to MKM myself... helpful guy, he was nice enough to share the source of of the script-engine in DNH with me (I still have it, if anyone wants... it's good study material for how lexer/parsers work as well as Bytecode and FSMs). But also, that's not the only thing. To have perfect pixel texture mapping, you'd need to map texels to pixels perfectly. Disabling bullets from rotating about arbitrary angles solves a part of it; the other part involves mapping bullets in such a way that the coordinates map to integer values. I believe in D3DX10+ it's done a little more intuitively. In script, this just means changing our code to floor the coord-value, but this is computationally expensive to do in a script environment. Perhaps we could make this suggestion as well? I can see how it can help with the rendering of certain sprites and especially bullets.

Also, good to see you still active, Drake. I wonder if Naut and Nuclear Cheese is still around too?
« Last Edit: September 25, 2017, 05:56:17 AM by Fujiwara no Mokou »

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #813 on: September 25, 2017, 06:55:16 AM »
the other part involves mapping bullets in such a way that the coordinates map to integer values. I believe in D3DX10+ it's done a little more intuitively. In script, this just means changing our code to floor the coord-value, but this is computationally expensive to do in a script environment. Perhaps we could make this suggestion as well? I can see how it can help with the rendering of certain sprites and especially bullets.
I already knew this was the case when I made the request back then, but despite implementing the fixed angle parameter, he probably didn't realize this wouldn't fix the issue entirely. I didn't want to press the issue when he had just done the work. At this point development has been halted for a while now though; mkm has a family and full-time job and whatnot so we might not see any future updates unless he decides to release the source or have someone take over.

The fix isn't as simple as flooring the values if it requires movement at all, since if you just round the rendering position the object will still be positioned there. You need to decouple the object's real position from where it's being rendered or else the movement will be inaccurate to varying degrees (e.g. if you're moving something less than 0.5px/f it'll stay still because it's always rounded). Additionally if anything about the object uses Move object functions like SetSpeed, SetAngle, etc, you need to correct for this in advance because the movement is applied to the object after the script is done for that frame but before it's rendered.

Also, good to see you still active, Drake. I wonder if Naut and Nuclear Cheese is still around too?
nah lol
« Last Edit: September 25, 2017, 06:58:12 AM by Drake »

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Lollipop

  • stay woke
  • literally and figuratively dying
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #814 on: September 25, 2017, 08:04:23 PM »
is there a way to restrict player movement so that the player cant move for a period of time
Touhou 1CCS:
Hard: LLS, EoSD(NB), PCB(NB), IN, MoF, TD, DDC(NB), LoLK
Lunatic: EoSD, PCB, DDC, LoLK
Extra: LLS, EoSD, PCB(Extra&Phantasm), IN, MoF, SA, DDC, LoLK
Current Focus: 1cc SA Hard, or an Extra

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #815 on: September 25, 2017, 11:44:45 PM »
I see! How do you set up the text boxes in a single script however? How do you insert the portraits and what not?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #816 on: September 26, 2017, 12:38:30 AM »
is there a way to restrict player movement so that the player cant move for a period of time

At the start of the time period, log the player's current position (GetPlayerX, GetPlayerY). Then for duration of period force-set the player's position regardless of where they move to that logged position (ObjRender_SetX, ObjRender_SetY). That should do it.

As an example from SeitenTouji Extra Stage:
```
   let pcoord = [GetPlayerX, GetPlayerY];
   loop(180) {
       ObjRender_SetX(GetPlayerObjectID(), pcoord[0]);
       ObjRender_SetY(GetPlayerObjectID(), pcoord[1]);
       yield;
   }
```

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #817 on: September 28, 2017, 02:34:43 AM »
I managed to set up portraits and what not, but my portraits always end up with a dark opacity. It's never the original opacity. Why is that?

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #818 on: September 28, 2017, 03:19:19 AM »
Please pastebin your script. Can't really say much without seeing what you're doing.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #819 on: September 28, 2017, 12:47:32 PM »
Nvm I found out why it's at a dark opacity. The alpha wasn't raised higher. Don't mind this question, I'm just being stupid. 
« Last Edit: September 28, 2017, 12:53:19 PM by Dire29 »

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #820 on: September 30, 2017, 04:06:26 PM »
Okay, I'm having a really dumb and confusing problem here.
My items work as intended, but their graphics aren't showing up. I have double-checked, and both the directory paths and graphic rects are 100% correct:

Code: [Select]
#UserItemData

item_image = "../img/item.png"

ItemData{
id = 1
type = 2
rect = ( 0, 0, 12, 12 )
render = ALPHA
}
ItemData{
id = 2
type = 2
rect = ( 14, 0, 26, 12 )
render = ALPHA
}
ItemData{
id = 3
type = 3
rect = ( 26, 0, 40, 12 )
render = ALPHA
}

Code: [Select]
let HEALTH = 1;
let SPELL = 2;
let POINT = 3;

@Initialize{
    let path = GetCurrentScriptDirectory ~ "./item_data.dnh";
LoadItemData(path);
SetDefaultBonusItemEnable(false);
}

@MainLoop{
    yield;
}

@Event{
alternative(GetEventType)
    case(EV_GET_ITEM){
        let itemtype = GetEventArgument(0);
        if(itemtype == 1){
        if(GetPlayerLife < 250){ SetPlayerLife(GetPlayerLife+1); }
        }
        if(itemtype == 2){
        if(GetPlayerSpell <= 1295){ SetPlayerSpell(GetPlayerSpell+500); }
        }
    }
}

Another strange thing I've noticed is that I get an "x is not defined" error if I replace the item id with "HEALTH" or etc. in CreateItemU1. I clearly defined those in my item constant library!
« Last Edit: September 30, 2017, 04:09:52 PM by iVAwalys »
Lunatic 1CCs: PCB, IN, PoFV, HSiFS
Extra: All except PC-98.

Oh hey look I can do DNH scrips.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #821 on: October 01, 2017, 10:50:18 AM »
I have 2 new questions :3
1. After I called this, the sound "capture" is weirdly cut a lot so I can barely hear very little sound length... (the sound was present)
  while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
    if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
            +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
        AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
        PlaySound("capture",100,0);
      } else {PlaySound("failed",100,0);}
    Obj_Delete(objBoss);
    DeleteShotAll(TYPE_ALL,TYPE_IMMEDIATE);
    SetAutoDeleteObject(true);
    CloseScript(GetOwnScriptID());
    return;

2. How can the shot at TShot01 to TShot08 acts exactly like TShot11 to TShot18 , but spins at the opposite direction ?
    I tried a few ways but I stops at a direction at the end, so....
   https://pastebin.com/H8xEz1yj

I am so grateful for the last comments, didn't say thanks earlier because I don't want to spam the posts so I'll post  in here :)
 
« Last Edit: October 01, 2017, 10:58:30 AM by BananaCupcakey »
Just keep it neutral :3

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #822 on: October 01, 2017, 03:59:48 PM »
2. How can the shot at TShot01 to TShot08 acts exactly like TShot11 to TShot18 , but spins at the opposite direction ?
    I tried a few ways but I stops at a direction at the end, so....
   https://pastebin.com/H8xEz1yj

dir parameter:
To go in one direction:
dir += blah;

To go in the other direction:
dir -= blah;

What you're doing is adding y to both of these, making the change in dir over time different for 1-8 vs 11-18.

On a side note, I recommend using parameters to functions and tasks. These can greatly decrease the amount of copy-paste in your code and make it easier to debug. For example, the wait time and the bullet shot graphic can be parameterized and instead of having fireA...fireT, you can have a single fire() task that is properly parameterized.

Additionally, you do while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){break;}. I recommend using an approach that does not use break; - break; does NOT behave the same way pass; does in other languages.
« Last Edit: October 01, 2017, 04:01:41 PM by Sparen »

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #823 on: October 02, 2017, 11:42:11 AM »
Okay, I'm having a really dumb and confusing problem here.
My items work as intended, but their graphics aren't showing up. I have double-checked, and both the directory paths and graphic rects are 100% correct:
One quirk that is probably the cause of the graphics screwup is that you seemingly cannot start the item_image path with ../. If you use "./../img/item.png" it might work.

Additionally one thing that should be causing issues is that you have item id 1 set to be item type 2; this can be useful but in your case probably just makes life items act like bomb items since they should both run the itemtype == 2 block.

As for the CreateItemU1 issue I dunno where you're trying to call it. Within the item script it should work fine but anywhere else it would fail unless you're also defining it elsewhere (in which case it's probably that that's failing).

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Jimmy

  • Shameless spender
  • gaining big pounds
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #824 on: October 02, 2017, 09:32:38 PM »
1. After I called this, the sound "capture" is weirdly cut a lot so I can barely hear very little sound length... (the sound was present)
  while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
    if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
            +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
        AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
        PlaySound("capture",100,0);
      } else {PlaySound("failed",100,0);}
    Obj_Delete(objBoss);
    DeleteShotAll(TYPE_ALL,TYPE_IMMEDIATE);
    SetAutoDeleteObject(true);
    CloseScript(GetOwnScriptID());
    return;

Your script closes immediately after the sound is being played; in other words, there is no delay between the sound task and the end of the script, causing the sound to cut off instantly after it's activated. Adding a delay of 60-120 frames, depending on how long the sound effect lasts, should make the sound play entirely, since that delay makes the script close later.

You could do it like this:
Code: [Select]
while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
    if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
            +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
        AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
     PlaySound("capture",100,0);
} else {PlaySound("failed",100,0);}
    Obj_Delete(objBoss);
    DeleteShotAll(TYPE_ALL,TYPE_IMMEDIATE);
    SetAutoDeleteObject(true);
    loop(120) {      //delays the script closure by 120 frames (120 is an exemplary value here, use one that suits your needs)
        yield;            //or if you have a 'wait'-function, use it here
    }   
    CloseScript(GetOwnScriptID());
    return;
Normal 1cc: EoSD, PCB, IN, PoFV, MoF, UFO, TD, DDC, LoLK Legacy, HSiFS, WBaWC
Hard 1cc: IN, DDC, HSiFS
Extra clears: MoF, DDC, HSiFS, WBaWC

Goals: Going Extra Hard!

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #825 on: October 03, 2017, 08:28:15 PM »
Good time of day,

I have a question that is not really relevant to danmakufu. I want to ask about bulletforge. I have one friend, who is already writing on a danmakufu and would really like to upload his projects on that site, but he can't, since bulletforge isn't currently open for registrations. However, I had heard that people, kind of, can write an email to somebody and thus register there... Is that so? Or is there any other solutions?

Thanks in advise!

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #826 on: October 04, 2017, 06:48:07 AM »
Good time of day,

I have a question that is not really relevant to danmakufu. I want to ask about bulletforge. I have one friend, who is already writing on a danmakufu and would really like to upload his projects on that site, but he can't, since bulletforge isn't currently open for registrations. However, I had heard that people, kind of, can write an email to somebody and thus register there... Is that so? Or is there any other solutions?

Thanks in advise!
Contact KimoKeine (aka Blargel, administrator of Bulletforge) at channel #danmakufu on IRC. He can help your friend to get an account.

R. P. Genocraft

  • Craftsman of absolute unpredictability
  • Boundary of productive and lazy
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #827 on: October 07, 2017, 11:39:48 AM »
I'm trying to use gtbot's cutin function in a script but the spellcard name doesn't disappear in the end for some reason. It was supposed to disappear when the boss is deleted, so I tried to set the boss the same way as the sample script(let objBoss= GetEnemyBossObjectID[0];) but it returns this error: Array index out of bounds. What am I doing wrong?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #828 on: October 07, 2017, 10:09:28 PM »
I'm trying to use gtbot's cutin function in a script but the spellcard name doesn't disappear in the end for some reason. It was supposed to disappear when the boss is deleted, so I tried to set the boss the same way as the sample script(let objBoss= GetEnemyBossObjectID[0];) but it returns this error: Array index out of bounds. What am I doing wrong?

The library assumes you have Object Autodelete turned on.

        SetAutoDeleteObject(true);

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #829 on: October 08, 2017, 03:51:03 AM »
Needed to ask that currently I am frustrated at this problem  :)
How to let bullets reflects at all sides ? https://pastebin.com/DdjzZqB0
« Last Edit: October 08, 2017, 03:57:59 AM by BananaCupcakey »
Just keep it neutral :3

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #830 on: October 08, 2017, 04:54:06 AM »
Needed to ask that currently I am frustrated at this problem  :)
How to let bullets reflects at all sides ? https://pastebin.com/DdjzZqB0

I don't understand your problem. You already have a task BOINGceiling that handles three of the four sides of the screen. Just add another if/else for the bottom of the screen - the formula for reflection is the same for the top of the screen.

Unless your problem lies elsewhere in which case you'll need to explain what you have already tried and what you are currently experiencing, and how that is different from what you want.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #831 on: October 08, 2017, 05:52:30 AM »
Well, I tried this solution but the bottom bullets wasn't working correctly in a task :
while(ObjMove_GetX(obj)>0&&ObjMove_GetX(obj)<GetStgFrameWidth&&ObjMove_GetY(obj)>0){yield;}
   if(Obj_IsDeleted(obj)) { return; }
      if(ObjMove_GetX(obj) < 0 || ObjMove_GetX(obj) > GetStgFrameWidth) {
         if(ObjMove_GetX(obj) < 0) { ObjMove_SetX(obj, 0); }
         else { ObjMove_SetX(obj, GetStgFrameWidth); }
         ObjMove_SetAngle(obj, 180 - ObjMove_GetAngle(obj));
      }
      if(ObjMove_GetY(obj) < 0 || ObjMove_GetY(obj) > GetStgFrameHeight) {
         if(ObjMove_GetY(obj) < 0) { ObjMove_SetY(obj, 0); }
         else { ObjMove_SetY(obj, GetStgFrameHeight); }
         ObjMove_SetAngle(obj, -ObjMove_GetAngle(obj));
      }
      yield;
« Last Edit: October 08, 2017, 05:56:45 AM by BananaCupcakey »
Just keep it neutral :3

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #832 on: October 08, 2017, 07:37:41 AM »
Look at your while condition; you're missing the condition that the bullet stays above the bottom wall. The rest should be fine.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

R. P. Genocraft

  • Craftsman of absolute unpredictability
  • Boundary of productive and lazy
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #833 on: October 08, 2017, 09:38:16 AM »
The library assumes you have Object Autodelete turned on.

        SetAutoDeleteObject(true);
Oh, so that's why it worked in another script. But how can I play the music with Object Autodelete on if it stops after every single?

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #834 on: October 08, 2017, 12:20:13 PM »
missing the condition
Does the condition same as the GetStgFrameWidth... to >0 ? If not what is the condition (I do suck at advance math) ? I can't try it now because I'm going to be busy through all weekdays...
Just keep it neutral :3

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #835 on: October 08, 2017, 02:59:46 PM »
Oh, so that's why it worked in another script. But how can I play the music with Object Autodelete on if it stops after every single?

The fact that you're replaying music tracks at the start of every single worries me. I suggest loading and playing music tracks in either a Stage or Plural, whichever you use.

In general, if a task must run for the duration of a boss fight, don't run an abbreviated version at the start of every single if it's going to have a significant effect on the player's experience.

Jimmy

  • Shameless spender
  • gaining big pounds
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #836 on: October 08, 2017, 04:21:08 PM »
Does the condition same as the GetStgFrameWidth... to >0 ? If not what is the condition (I do suck at advance math) ? I can't try it now because I'm going to be busy through all weekdays...
To be more specific:
You're missing ObjMove_GetY(obj) < GetStgFrameHeight in the while-loop. Note that you want to make the bullets bounce off the bottom of the STG frame, which is its full height, not width, hence GetStgFrameHeight.
Normal 1cc: EoSD, PCB, IN, PoFV, MoF, UFO, TD, DDC, LoLK Legacy, HSiFS, WBaWC
Hard 1cc: IN, DDC, HSiFS
Extra clears: MoF, DDC, HSiFS, WBaWC

Goals: Going Extra Hard!

R. P. Genocraft

  • Craftsman of absolute unpredictability
  • Boundary of productive and lazy
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #837 on: October 08, 2017, 05:54:30 PM »
The fact that you're replaying music tracks at the start of every single worries me. I suggest loading and playing music tracks in either a Stage or Plural, whichever you use.

In general, if a task must run for the duration of a boss fight, don't run an abbreviated version at the start of every single if it's going to have a significant effect on the player's experience.
Oh, I see. I'm new to plural scripts so there's a lot I don't know yet... It worked, thanks!

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #838 on: October 14, 2017, 12:33:36 PM »
So, lately I've been wandering about how to make those glowing laser sources that Clownpiece has, as shown on the picture http://i64.tinypic.com/6ekn09.png
So far, I didn't succed. First issue is that I can't find the required image for it. And second one is that l can't make the lasers blend with any images i find, no matter what blend type i choose. I would be really grateful if someone could help me with recreating those exact lasers.

IIRawsomeII

  • Treat me as you will
    • Rawcode Studios
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #839 on: October 15, 2017, 04:56:45 AM »
I'm making a player script but the sprite doesn't update.
Code: [Select]
task renderPlayer // Render Player
{
ObjPrim_SetTexture(playerObj,playerTex); // Set Texture
Obj_SetRenderPriority(playerObj,31); // Set Render Layer
ObjRender_SetBlendType(playerObj,BLEND_ALPHA);  // Set To Alpha
ObjRender_SetAngleXYZ(playerObj,0,0,0); // Set Rot
ObjRender_SetScaleXYZ(playerObj,1,1,0); // Set Scale
ObjRender_SetAlpha(playerObj,255); // Set Alpha
ObjSprite2D_SetSourceRect(playerObj,0,0,32,54); // Set Rect
ObjSprite2D_SetDestCenter(playerObj); // Set Center
ObjRender_SetPosition(playerObj,GetPlayerX(),GetPlayerY(),0); // Set Player Position

while(!Obj_IsDeleted(playerObj))
{
ObjRender_SetPosition(playerObj,GetPlayerX(),GetPlayerY(),0); // Set Player Position
renderHitbox(GetPlayerX(),GetPlayerY());
if(GetKey(VK_LEFT)) // Going Left
{
ObjRender_SetAngleY(playerObj,0);
}
else if(GetKey(VK_RIGHT)) // Going Right
{
ObjRender_SetAngleY(playerObj,180);
}
else
{
}
yield;
}
}
The code is called on Initialize. I would like some help. Thanks
Let's start again