a bit of a mess? surely not

This commit is contained in:
the me 2022-08-15 10:51:51 -07:00
parent 47cae629df
commit 0ead044da1
14 changed files with 289 additions and 16 deletions

View File

@ -9,6 +9,7 @@
{"id":{"name":"stat","path":"scripts/stat/stat.yy",},"order":3,}, {"id":{"name":"stat","path":"scripts/stat/stat.yy",},"order":3,},
{"id":{"name":"vlambeer","path":"scripts/vlambeer/vlambeer.yy",},"order":1,}, {"id":{"name":"vlambeer","path":"scripts/vlambeer/vlambeer.yy",},"order":1,},
{"id":{"name":"x_unitsetup","path":"scripts/x_unitsetup/x_unitsetup.yy",},"order":0,}, {"id":{"name":"x_unitsetup","path":"scripts/x_unitsetup/x_unitsetup.yy",},"order":0,},
{"id":{"name":"x_skillstuff","path":"scripts/x_skillstuff/x_skillstuff.yy",},"order":12,},
{"id":{"name":"c_decolor","path":"scripts/c_decolor/c_decolor.yy",},"order":10,}, {"id":{"name":"c_decolor","path":"scripts/c_decolor/c_decolor.yy",},"order":10,},
{"id":{"name":"s_guy","path":"sprites/s_guy/s_guy.yy",},"order":0,}, {"id":{"name":"s_guy","path":"sprites/s_guy/s_guy.yy",},"order":0,},
{"id":{"name":"easing","path":"scripts/easing/easing.yy",},"order":4,}, {"id":{"name":"easing","path":"scripts/easing/easing.yy",},"order":4,},
@ -48,6 +49,7 @@
{"id":{"name":"keyboard_check_advanced","path":"scripts/keyboard_check_advanced/keyboard_check_advanced.yy",},"order":8,}, {"id":{"name":"keyboard_check_advanced","path":"scripts/keyboard_check_advanced/keyboard_check_advanced.yy",},"order":8,},
{"id":{"name":"collision_line_width","path":"scripts/collision_line_width/collision_line_width.yy",},"order":9,}, {"id":{"name":"collision_line_width","path":"scripts/collision_line_width/collision_line_width.yy",},"order":9,},
{"id":{"name":"draw_rectangle_width","path":"scripts/draw_rectangle_width/draw_rectangle_width.yy",},"order":7,}, {"id":{"name":"draw_rectangle_width","path":"scripts/draw_rectangle_width/draw_rectangle_width.yy",},"order":7,},
{"id":{"name":"s_guy2","path":"sprites/s_guy2/s_guy2.yy",},"order":1,},
{"id":{"name":"dir2hv","path":"scripts/dir2hv/dir2hv.yy",},"order":2,}, {"id":{"name":"dir2hv","path":"scripts/dir2hv/dir2hv.yy",},"order":2,},
{"id":{"name":"tag","path":"scripts/tag/tag.yy",},"order":6,}, {"id":{"name":"tag","path":"scripts/tag/tag.yy",},"order":6,},
{"id":{"name":"instance_create","path":"scripts/instance_create/instance_create.yy",},"order":6,}, {"id":{"name":"instance_create","path":"scripts/instance_create/instance_create.yy",},"order":6,},

View File

@ -1,2 +1,5 @@
log(un); c_addunit(un.chara, ARMY.US);
c_inheritunit(2, 2, un.chara); var i;
for (i=0; i<array_length(global.units[ARMY.US]); i++) {
c_inheritunit(2+i, 2, un.chara);
}

View File

@ -1,4 +1,10 @@
draw_self(); draw_self();
drawstate(); drawstate();
log(data);
draw_set_color(c_red);
draw_rectangle(x-ts.x/2, y-ts.y/2-1,
x-ts.x/2+(ts.x*(data.hp.val/data.hp.val)),
y-ts.y/2+1, false
);
//draw_set_color(c_red); //draw_set_color(c_red);
//draw_circle(x, y, 5, false); //draw_circle(x, y, 5, false);

View File

@ -1,4 +1,4 @@
function c_gettile(x, y) { function c_gettile(x, y, absolute=false) {
var thex = round((x-16)/ts.x); var thex = round((x-16)/ts.x);
var they = round((y-16)/ts.y); var they = round((y-16)/ts.y);
if c_tileexists(thex, they) return mp[thex][they]; if c_tileexists(thex, they) return mp[thex][they];

View File

@ -41,7 +41,7 @@ function st_moving() {
prevremainingmov = remainingmov; prevremainingmov = remainingmov;
c_decolor_all(c_red); c_decolor_all(c_red);
c_decolor_all(c_green); c_decolor_all(c_green);
var guy = c_gettile(x, y); var guy = c_gettile(x, y, true);
if guy != noone { if guy != noone {
c_colortile(guy.x, guy.y, c_green); c_colortile(guy.x, guy.y, c_green);
switch dir { switch dir {
@ -59,7 +59,32 @@ function st_moving() {
break; break;
} }
} }
if select {
var rng = [1];
var guy = c_gettile(x, y, true);
var hitting = noone;
switch dir {
case DIR.LEFT:
hitting = c_gettile(guy.x-1, guy.y);
break;
case DIR.DOWN:
hitting = c_gettile(guy.x, guy.y+1);
break;
case DIR.UP:
hitting = c_gettile(guy.x, guy.y-1);
break;
case DIR.RIGHT:
hitting = c_gettile(guy.x+1, guy.y);
break;
}
if hitting != noone {
}
}
if back {
state = st_standing;
drawstate = c_null;
}
/*if x < (pos.x-mov)*ts.x { /*if x < (pos.x-mov)*ts.x {
x = (pos.x-mov)*ts.x; x = (pos.x-mov)*ts.x;
} else if x > (pos.x+mov+1)*ts.x { } else if x > (pos.x+mov+1)*ts.x {

View File

@ -12,8 +12,8 @@ function stat(name_, fullname_, desc_, replacements_=[]) constructor {
} }
#macro st global.stats #macro st global.stats
function unitstat(val, name_, fullname_, desc_, replacements_) : stat(name_, fullname_, desc_, replacements_) constructor { function unitstat(val_, name_, fullname_, desc_, replacements_) : stat(name_, fullname_, desc_, replacements_) constructor {
value = val; val = val_;
modifier = 0; modifier = 0;
} }

View File

@ -1,10 +1,20 @@
global.map = [ global.map = [
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()], [new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()], [new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()], [new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()], [new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()], [new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
]; [new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
[new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata(), new tiledata()],
]; //i simply dont care
function c_informtiles() { function c_informtiles() {
for (i=0; i<array_length(global.map); i++) { for (i=0; i<array_length(global.map); i++) {
for (j=0; j<array_length(global.map[i]); j++) { for (j=0; j<array_length(global.map[i]); j++) {

View File

@ -1,5 +1,5 @@
//global.units = 5; //global.units = 5;
global.units = [[]]; global.units = [[],[]];
enum ARMY { enum ARMY {
US, US,
@ -17,11 +17,23 @@ var mydata = {
function unit(personaldata_, classdata_, stats_) constructor { function unit(personaldata_, classdata_, stats_) constructor {
name = personaldata_.name; name = personaldata_.name;
sprite = personaldata_.sprite; sprite = personaldata_.sprite;
alignment = noone;
var i;
for (i=0; i<array_length(stats_); i++) {
self[$stats_[i].name] = stats_[i];
}
global.unitdata[$name] = self; global.unitdata[$name] = self;
} }
nu unit(mydata, [st.hp.add(92), st.str.add(20), st.def.add(20)]); nu unit(mydata, mydata, [st.hp.add(92), st.str.add(20), st.def.add(20)]);
mydata = {
name: "kris",
desc: "totally kris",
skills: ["SKILLS.LUNA"],
sprite: s_guy2,
}
nu unit(mydata, mydata, [st.hp.add(92), st.str.add(20), st.def.add(20)]);
function archetypedata() constructor { function archetypedata() constructor {
//PERSONALDATA AND CLASSDATA ARE THE SAME THINGS //PERSONALDATA AND CLASSDATA ARE THE SAME THINGS
@ -31,6 +43,7 @@ function c_addunit(unit, alignment) {
//log(5); //log(5);
//log(global.units); //log(global.units);
array_push(global.units[alignment], unit); array_push(global.units[alignment], unit);
unit.alignment = alignment;
log(global.units[alignment]); log(global.units[alignment]);
} }

View File

@ -0,0 +1,44 @@
enum SKILLS {
NULL,
FIGHT, //1
LUNA,
#region size
_DEBUG,
_CONSOLE,
SIZE,
#endregion
}
global.x_skillmanager = {
ReferenceskillList: array_create(SKILLS.SIZE),
Bindskill: function(skill, index) {
ReferenceskillList[index] = skill;
},
}
function c_getskillbyid(index) {
var skill = global.x_skillmanager.ReferenceskillList[index];
if(skill == 0){
log("skill index " + string(index) + " isnt bound! make sure to bind that shit!");
return global.x_skillmanager.ReferenceskillList[SKILLS.NULL]
}
return skill;
}
function c_getidbyskill(skill){
return skill.idnum;
}
global.defdata = {
myhooks: {}, //make ondie
name: "DEFAULT skill DATA",
description: "LOL",
tooltip: "IM FUNNY",
sprite: s_guy2,
usage: SKTYPE.NORMAL,
}
enum SKTYPE {
NORMAL,
HIDDEN,
}

View File

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "Scripts",
"path": "folders/Scripts.yy",
},
"resourceVersion": "1.0",
"name": "x_skillstuff",
"tags": [],
"resourceType": "GMScript",
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

View File

@ -0,0 +1,79 @@
{
"bboxMode": 0,
"collisionKind": 0,
"type": 0,
"origin": 4,
"preMultiplyAlpha": false,
"edgeFiltering": false,
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 5,
"bbox_right": 26,
"bbox_top": 1,
"bbox_bottom": 31,
"HTile": false,
"VTile": false,
"For3D": false,
"width": 32,
"height": 32,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"swatchColours": null,
"gridX": 0,
"gridY": 0,
"frames": [
{"compositeImage":{"FrameId":{"name":"c7b4d2b5-05bb-4c0f-8881-9b403315f06e","path":"sprites/s_guy/s_guy.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
{"FrameId":{"name":"c7b4d2b5-05bb-4c0f-8881-9b403315f06e","path":"sprites/s_guy/s_guy.yy",},"LayerId":{"name":"57be2f77-fa54-4438-8ed7-0073af24bc49","path":"sprites/s_guy/s_guy.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
],"parent":{"name":"s_guy","path":"sprites/s_guy/s_guy.yy",},"resourceVersion":"1.0","name":"c7b4d2b5-05bb-4c0f-8881-9b403315f06e","tags":[],"resourceType":"GMSpriteFrame",},
],
"sequence": {
"spriteId": {"name":"s_guy","path":"sprites/s_guy/s_guy.yy",},
"timeUnits": 1,
"playback": 1,
"playbackSpeed": 30.0,
"playbackSpeedType": 0,
"autoRecord": true,
"volume": 1.0,
"length": 1.0,
"events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MessageEventKeyframe>",},
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
"tracks": [
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
{"id":"a0dd2354-2808-445b-aff6-29df2d196036","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"c7b4d2b5-05bb-4c0f-8881-9b403315f06e","path":"sprites/s_guy/s_guy.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"modifiers":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack",},
],
"visibleRange": null,
"lockOrigin": false,
"showBackdrop": true,
"showBackdropImage": false,
"backdropImagePath": "",
"backdropImageOpacity": 0.5,
"backdropWidth": 1366,
"backdropHeight": 768,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"xorigin": 16,
"yorigin": 16,
"eventToFunction": {},
"eventStubScript": null,
"parent": {"name":"s_guy","path":"sprites/s_guy/s_guy.yy",},
"resourceVersion": "1.3",
"name": "s_guy",
"tags": [],
"resourceType": "GMSequence",
},
"layers": [
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"57be2f77-fa54-4438-8ed7-0073af24bc49","tags":[],"resourceType":"GMImageLayer",},
],
"nineSlice": null,
"parent": {
"name": "Sprites",
"path": "folders/Sprites.yy",
},
"resourceVersion": "1.0",
"name": "s_guy",
"tags": [],
"resourceType": "GMSprite",
}

View File

@ -0,0 +1,79 @@
{
"bboxMode": 0,
"collisionKind": 0,
"type": 0,
"origin": 4,
"preMultiplyAlpha": false,
"edgeFiltering": false,
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 5,
"bbox_right": 26,
"bbox_top": 0,
"bbox_bottom": 30,
"HTile": false,
"VTile": false,
"For3D": false,
"width": 32,
"height": 32,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"swatchColours": null,
"gridX": 0,
"gridY": 0,
"frames": [
{"compositeImage":{"FrameId":{"name":"c7b4d2b5-05bb-4c0f-8881-9b403315f06e","path":"sprites/s_guy2/s_guy2.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
{"FrameId":{"name":"c7b4d2b5-05bb-4c0f-8881-9b403315f06e","path":"sprites/s_guy2/s_guy2.yy",},"LayerId":{"name":"57be2f77-fa54-4438-8ed7-0073af24bc49","path":"sprites/s_guy2/s_guy2.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
],"parent":{"name":"s_guy2","path":"sprites/s_guy2/s_guy2.yy",},"resourceVersion":"1.0","name":"c7b4d2b5-05bb-4c0f-8881-9b403315f06e","tags":[],"resourceType":"GMSpriteFrame",},
],
"sequence": {
"spriteId": {"name":"s_guy2","path":"sprites/s_guy2/s_guy2.yy",},
"timeUnits": 1,
"playback": 1,
"playbackSpeed": 30.0,
"playbackSpeedType": 0,
"autoRecord": true,
"volume": 1.0,
"length": 1.0,
"events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MessageEventKeyframe>",},
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
"tracks": [
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
{"id":"65414b11-eb75-4d45-92c0-89d1a6df82fa","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"c7b4d2b5-05bb-4c0f-8881-9b403315f06e","path":"sprites/s_guy2/s_guy2.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"modifiers":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack",},
],
"visibleRange": null,
"lockOrigin": false,
"showBackdrop": true,
"showBackdropImage": false,
"backdropImagePath": "",
"backdropImageOpacity": 0.5,
"backdropWidth": 1366,
"backdropHeight": 768,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"xorigin": 16,
"yorigin": 16,
"eventToFunction": {},
"eventStubScript": null,
"parent": {"name":"s_guy2","path":"sprites/s_guy2/s_guy2.yy",},
"resourceVersion": "1.3",
"name": "s_guy",
"tags": [],
"resourceType": "GMSequence",
},
"layers": [
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"57be2f77-fa54-4438-8ed7-0073af24bc49","tags":[],"resourceType":"GMImageLayer",},
],
"nineSlice": null,
"parent": {
"name": "Sprites",
"path": "folders/Sprites.yy",
},
"resourceVersion": "1.0",
"name": "s_guy2",
"tags": [],
"resourceType": "GMSprite",
}