NScripter Ver.19.00

■ このスレッドは過去ログ倉庫に格納されています
2014/01/30(木) 22:41:08.23ID:BRbRh5DC
商業流通でなければフリーで利用可能な
ゲームエンジンNScripterについて語るスレです。

・本家
ttp://www.nscripter.com/

・うpろだ
ttp://nscuploader.wkeya.com/
2014/03/10(月) 22:14:13.31ID:8VIsfxv+
今すぐの動作は確認してないけど、自分が実際に使っていたものをちょっと弄ってはっつけて見ます

lceffect "キャラクタ名",1
 とか
lceffect "キャラクタ名",2
 とかで動くと思います

lceffect が気軽に呼び出して使うメインのサブルーチン。パラメータが多く見えるのは削り残しです。

lcanimation は、 lceffect の中でのみ呼ばれるもっと細かい挙動をつかさどるサブルーチン (シナリオ上からは呼ばない)
2014/03/10(月) 22:16:14.60ID:8VIsfxv+
; ニックネーム,エフェクトタイプ,画像中心からのX位置,画像中心からのY位置,サイズ
@lceffect
; CTRL押されていれば処理しない
if getskip() == 1 or 0<>GETKEY("CTRL") then
return
end if

param %nick,%type,%xpos,%ypos,%size
if %nick == #NIL or %nick == "" then OKBOX "立ち絵命令文のニックネームが不正です" , "lc命令文エラー"
%spname = "character:" + %nick ; ★スプライトセット系。各自対応を
getspinfo %spname , %spinfo
if ISDEF(%spinfo.cx) == 1 and ISDEF(%spinfo.cy) == 1then ; ほしい情報がちゃんと定義されてる?(存在する?)
if %type == 4 then
lcanimation %spname,(%spinfo.cx+5),%spinfo.cy,0,60
lcanimation %spname,(%spinfo.cx-7),%spinfo.cy,0,60
lcanimation %spname,(%spinfo.cx+10),%spinfo.cy,0,60
lcanimation %spname,(%spinfo.cx-7),%spinfo.cy,0,60
lcanimation %spname,(%spinfo.cx+5),%spinfo.cy,0,60
lcanimation %spname,(%spinfo.cx),%spinfo.cy,0,60
elseif %type == 5 then
lcanimation %spname,%spinfo.cx,%spinfo.cy-20,0,40
lcanimation %spname,%spinfo.cx,%spinfo.cy-40,0,40
lcanimation %spname,%spinfo.cx,%spinfo.cy-30,0,40
lcanimation %spname,%spinfo.cx,%spinfo.cy,0,30
end if
end if
end if
return
2014/03/10(月) 22:17:24.88ID:8VIsfxv+
; 立ち絵を動かすサブルーチンで呼ばれるサブルーチン。弄るのは・・・X,Y座標関係と傾きのみ?
@lcanimation
param %spname,%to.cx,%to.cy,%to.rot,%time
; SP "window:linebreak",{name={%ld1 , %ld2 , %ld1 , %ld2 , %ld1},xs=%size,ys=%size,cx=(%send_cx+%xpos),cy=(%send_cy+%ypos),animtime=100,animtype="round"}
GETSPINFO %spname,%from
; CPRINT %from.cx
;-----------------
; %from から %to の値に %time掛けて 移行させる処理
;------------------
RESETTIMER ;---- 時間処理開始
do
%nowtime=GETTIMER() ;---- 経過時間取得
if %nowtime > %time then
exit ;---- 経過時間が超過したらloopを抜ける
end if
;---- 全体の何割経過したかを %parcentへ算出
%parcent = %nowtime / %time

%now.cx = %from.cx - ((%from.cx - %to.cx) * %parcent)
%now.cy = %from.cy - ((%from.cy - %to.cy) * %parcent)
%now.rot = %from.rot - ((%from.rot - %to.rot) * %parcent)

; CPRINT "%parcent:"+STR(%parcent)+" / %now.cx:"+STR(%now.cx)+" / %now.cy:"+STR(%now.cy)+" / %now.rot:"+STR(%now.rot)

SPMOVELT %spname,%now.cx,%now.cy, %from.xs , %from.ys , %now.rot , 255
print #C
loop
; 【※】loop抜け@一番最後の処理で最終目標の to 値で表示させる。 cx,cyだけは中心位置が変更しないので、そもそもtoが存在しない
SPMOVELT %spname, %to.cx , %to.cy , %from.xs , %from.ys , %from.rot , 255
print #C
return
■ このスレッドは過去ログ倉庫に格納されています
5ちゃんねるの広告が気に入らない場合は、こちらをクリックしてください。

ニューススポーツなんでも実況